Hello @jhilado,
In this case you should not tick the checkbox: “Hide Field From Public Page” property of the calculated field, because in this case the field is inserted using the an <input type="hidden"> tag.
You simply should enter the special class: hide through the property: “Add CSS Layout Keywords”, and then use the following piece of code as part of the equation:
jQuery('.hide').removeClass('hide');
Assuming that your current equation is for example: fieldname1+fieldname2 you should edit it similar to:
(function(){
jQuery('.hide').removeClass('hide');
return fieldname1+fieldname2;
})()
Best regards.
It worked, thanks so much!
How about including the div that holds the hidden fields? This is so when the fields appear, I can style the container with borders. Without hiding the container, there is an empty div with borders that does not populate until I press the calculate button.
Also buttons? I can’t apply the function you provided since buttons and divs do not have equation fields.
Hello,
To include a “DIV” tag directly, you should insert a “HTML Content” field in the form, and enter directly the tag into its content with the styles to apply to the tag as the “style” attribute.
If you want to display the DIV tag pressing a button, you simply should enter the following piece of code as the onclick event of the button field:
jQuery('.hide').removeClass('hide');
and that’s all.
Best regards.