In this guide, we will explain how to display an image and hide the "Photo" field if the "Text" field prefills with an Image URL.
- Initial Setup:
- Drag and drop a âSalesforce Lookupâ field, a âSalesforce Prefillâ field, a âTextâ field, an âHTMLâ field, a "Photoâ field, and a âField Update Workflowâ field onto your form.
- Rename these fields as needed.
- Configuring The âSalesforce Lookupâ Field:
- Click the pencil icon of the âSalesforce Lookupâ field.
- Set âObjectâ and âDisplay Additional Fieldsâ as shown below.
- Configuring The âSalesforce Prefillâ Field:
- Click the pencil icon of the âSalesforce Prefillâ field.
- Set âObjectâ, âFormyoula Parent Fieldâ, and âSalesforce Parent Fieldâ as shown below.
- Map the âTextâ form field to the âPhoto URLâ field.
- Configuring The âHTMLâ Field:
- Click the pencil icon of the âHTMLâ field.
- Paste the HTML code to display the image using the merge field.
- Please use the below code.
- Here â4950-bae1-a429â is the field ID of the âTextâ field named âPrefill URLâ.
<img src="{{4950-bae1-a429}}">
- Set âYesâ for the âEnable Reload On Merge Field Changesâ option.
- Configuring The âField Update Workflowâ Field:
- Click the pencil icon of the âField Update Workflowâ field.
- Set Rule Criteria to âPrefill URL || not equal to || â.
- Set Field Updates Success to âAttach a Photo || hidden || trueâ.
- Set Field Updates Fails to âAttach a Photo || hidden || falseâ.
- Test The Form:
- It will display the image and hide the âPhotoâ field if the âTextâ is prefilled with a value.
- Note: You can use a âHiddenâ field instead of the âTextâ field.
For any questions, please contact us - [email protected] or the Formyoula in-app chat. đ