I need to add a custom CSS class to certain buttons when parts of the content is completed. I’ve done this using JQuery, however due to the nature of Maestro forms, the class gets removed on navigation to/from other pages.
I’ve tried to have them added during the page change event, however it seems that the page change event runs prior to the actual page change occurring and the class gets removed before the page is shown.
Is there another way to do this?
You can use the Dynamic Class Rule.
Create a new rule called "Dynamic Class"
You can either return a string or an object in this rule.
A string will be the class name to be added.
if(Util.isBlank(data.firstName)) return "class-blank";
else return "class-not-blank";
If you use an object you can set multiple classes