Dynamic change "required" on form?

Is there a way to dynamically set the status of if a field is required or not on a form?

I have a list of the fields in a DB with Y/N values of if they are required or not… and I can read these values in. I would like to either highlight each field by changing its color where the value is “Y” OR dynamically adjust the “required” attribute.

Any ideas? the Macro sc_field_style doesnt work on forms.

1 Like

Nobody ever answered this… I ended up using javascript to color the required fields and not use the built in “required” flag from Scriptcase.

To change the label color and label name you can use this :

sc_label(‘field_name’) = “< b style=‘color:red’> Label Name*</ b>”;

Sorry you can delete the spaces in < b and </ b>

But to do the validation required dynamically, I am also looking for it.