I have one picklist field where 'Other' can be selected. I want to create a text field that is dependent on this picklist where the user can then type in this other reason.

I know the mechanics of this can be accomplished using validation rules, where I can check to see if 'Other' is selected, then I can require the text field. However, the field does not get greyed out like dependent picklists and text can still be entered. I know I can use a validation rule again to not allow text unless 'Other' is selected, but that feels a bit hacky and I'd rather grey out the field is possible.

  • Are you using VF or Lightning component? Feb 18 '19 at 18:44
  • @PranayJaiswal I'm just using the built in field editor within the Salesforce UI. This is easy to do to create dependent picklists this way but I can't see how to do it picklist to text field. I'm aware this can be done in VF or Lightning but don't want to go that way
    – Josh
    Feb 18 '19 at 18:48

The only fields eligible for dependency are Picklists and Checkbox fields. (Checkboxes can only be controlling, not dependent, fields).

If you don't want to build custom functionality in Lightning or Visualforce, Validation Rules are the best currently available solution.

Future enhancements that have been discussed (at Dreamforce and presumably elsewhere) for providing conditional rendering at the section or field level within a Lightning page layout might help to address this kind of need in the future, but you cannot rely on that today.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.