function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Rajeev Sengar 2Rajeev Sengar 2 

How to display the text field based on a response received for a survey question?

We have a requirement where we have posted a question in a salesforce survey with some picklist values. One of the picklist values is "Other". So if the user selects the "Other" option then a new free text field should appear.
Can we display a free text field in a survey based on a response that the user has selected?
Vishwajeet kumarVishwajeet kumar
Hello,
Assuming you are using Visualforce or LWC to display picklist options. You can set some variable or call javascript method to render the Free text field on Picklist value changes. Use validation on Free Text field to render only when other picklist value is set to "Other". Reload the components each time picklist value changes.

Thanks
Joseph MaryJoseph Mary
Thank you for participating in the DG customer survey at dgcustomerfirst.com $100 gift card (https://www.dgcustomerfirstgiftcards.com/survey-page/). Your feedback is valuable in helping us sweeten our customer experience. We appreciate the time and effort you've taken to share your thoughts with us. By completing the survey honestly and thoroughly, you provide essential insights that will contribute to our ongoing efforts to provide excellent service to all our customers. Thank you again for your participation.