Allow field required status to be set dynamically

  • 2
  • Idea
  • Updated 2 years ago
  • (Edited)
Currently fields on a page are either required, or not. If a field is required, there is a visual indictor on the field and the row can't be saved without entering a value. 

I often have a need to make fields required in some situations, but not in others, depending on other values in the row or in other models.

Stopping the user saving if a dynamically required field is not entered can be achieved with validation in a Skuid snippet or using a standard SF validation rule.

However, this doesn't visually mark the field as required so the user knows to enter it. 

Could the required status of fields be allowed to be set dynamically, in much the same way as the Render and Enabled are currently in the Rendering tab for the field?

On a related topic, it would also be nice if the visual indicator for required fields could be configurable, e.g. have an option for a configurable marker at the end of field labels (e.g. a red asterisk) instead of the red line, as it may be better suited to some customer's requirements (e.g. if they want a consistent look with other pages not built in Salesforce). 
Photo of Ryan Paddy

Ryan Paddy

  • 578 Points 500 badge 2x thumb

Posted 2 years ago

  • 2
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Easy peasy. Add the field twice to the page, assuming it's into a field editor. Setup one as required and other not as required and conditionally render based on the criteria you desire.
Photo of Ryan Paddy

Ryan Paddy

  • 578 Points 500 badge 2x thumb
That's a good workaround, thanks.

It would be nicer not to have to use duplicate fields, though. And to not have to enter the criteria and the reverse criteria and keep both up to date. 

I'm interested in this for table fields, as well as field editors. 
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,714 Points 20k badge 2x thumb
Yes. It would be nice to have field as required be conditionally set.