Support » Plugin: Calculated Fields Form » Hide Fieldset
Hide Fieldset
-
How to hide Fieldset https://prnt.sc/QCCECk0xyFzx
i am using 2 column with fieldset aiming to make right and left result
The page I need help with: [log in to see the link]
-
Hello @dhevilz
Thank you very much for using our plugin. I’m not sure about your request. If you want to hide the fieldset field, the question is: Why include it if the fieldset is empty? Why do you not remove the empty fieldsets?
Could you please send me additional details?
I visited the URL provided, but it does not include the form.
Best regards.
I want to make a calculation result template like this, with the green color want to use, while the empty fieldset is called “blank”
when not using blank fieldset,the display will be like this
Hello @dhevilz
You have some alternatives. You can assign a custom class name to the fieldset fields you want to hide and remove it when the plugin evaluates the equations to show those fieldset fields.
I’ll try to describe the process with a hypothetical example.
- Enter a custom CSS class through the “Customize Form Design” attribute in the “Form Settings” tab (https://resources.developers4web.com/cff/images/documentation/form-settings-tab.png)
#fbuilder .my-hide-class{ visibility:hidden !important; }
2. Enter the class name
my-hide-class
through the “Add CSS Layout Keywords” attributes of the fieldset fields you want to hide by default.3. Finally, if you are evaluating the equations by pressing a button field in the form, enter the following piece of code as its onclick event:
jQuery('.my-hide-class').removeClass('my-hide-class');
Best regards.
nice bro, thanks …
why this function not working after i add this function?
when plugin active in Version 1.1.146, this code ( https://prnt.sc/cujlGdUKtLGR ) work perfectly, but this code doesnt work #fbuilder .my-hide-class{ visibility:hidden !important; }
my-hide-class
Hello @dhevilz
The !important modifier imposes precedence over other CSS rules.
In this case, you can remove the class name by coding instead of using only dependency rules.
For example, assuming your equation is fieldname1+fieldname2 (hypothetical equation). You can modify it as follows:
(function(){ var result = fieldname1+fieldname2; if(AND(0<result, result<2220000){ getField(fieldname5|n).jQueryRef().removeClass('my-hide-class'); getField(fieldname6|n).jQueryRef().removeClass('my-hide-class'); getField(fieldname7|n).jQueryRef().removeClass('my-hide-class'); getField(fieldname8|n).jQueryRef().removeClass('my-hide-class'); } else if(2220000<=result) { getField(fieldname10|n).jQueryRef().removeClass('my-hide-class'); getField(fieldname11|n).jQueryRef().removeClass('my-hide-class'); getField(fieldname12|n).jQueryRef().removeClass('my-hide-class'); getField(fieldname13|n).jQueryRef().removeClass('my-hide-class'); } return result; })()
Best regards.
where i add this code?
Hello @dhevilz
Please, note that the code is only an example based on the hypothetical equation fieldname1+fieldname2. You should modify it to your project’s requirements.
Please, enter the code through the “Set equation” attribute in the calculated field settings.
Best regards.
- You must be logged in to reply to this topic.