2

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.

2
  • Are you using VF or Lightning component? Commented Feb 18, 2019 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
    Commented Feb 18, 2019 at 18:48

1 Answer 1

4

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.

1
  • Dynamic forms, which was introduced, also can assist, however, this is not a realtime/rendering scenario, but rather a different/easier way to control which/when fields are shown on the page.
    – Saariko
    Commented Nov 2, 2021 at 6:35

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .