Hello,
You should create dependencies, but through the dependencies you are not disabling/enabling the fields, you’re hiding/showing them. The dependencies are associated only to the following fields:
– Checkbox
– Radio Button
– DropDown
– Calculated Field
So, if you want to create dependencies for a number field, you should insert a calculated field (as auxiliary field) whose equation check the value of the number field and return a result, and based on the result you define the dependency rule for showing or not the rest of fields.
Note: as the calculated field is used as auxiliary, it is not needed in the form’s interface, so, you can tick the property: Hide Field From Public Page
More information about the use of dependencies with the calculated fields in the following link:
http://cff.dwbooster.com/documentation#dependencies
Best regards.
Thread Starter
Damn!
(@greedymind)
Hello,
I know how to show or hide them, but what I want to know is if it is possible to grey out certain fields on a condition, meaning the fields should be visible but inaccessible to the users?
Thanks.
Hello @greedymind,
In this case you should convert the fields in readonly, or editable, but this code must be implemented by yourself as part of your equations:
for example, assuming you want convert the input field: fieldname1 in readonly, include the following piece of code as part of your equation:
jQuery('[id*="fieldname'+'1_"]').prop('readonly', true);
To make the field editable again:
jQuery('[id*="fieldname'+'1_"]').prop('readonly', false);
Best regards.
Thread Starter
Damn!
(@greedymind)
Thanks a lot. I’ll be sure to try it out and let you know.