Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Author codepeople

    (@codepeople)

    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.

    Thread Starter MasG

    (@dhevilz)

    I want to make a calculation result template like this, with the green color want to use, while the empty fieldset is called “blank”

    https://prnt.sc/04FZyf0emJt4

    when not using blank fieldset,the display will be like this

    https://prnt.sc/Z8Qjwv_Vuu-U

    Plugin Author codepeople

    (@codepeople)

    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.

    1. 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.

    Thread Starter MasG

    (@dhevilz)

    nice bro, thanks …

    Thread Starter MasG

    (@dhevilz)

    why this function not working after i add this function?

    https://prnt.sc/hCyPQIOjwolN

    Thread Starter MasG

    (@dhevilz)

    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

    Plugin Author codepeople

    (@codepeople)

    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.

    Thread Starter MasG

    (@dhevilz)

    where i add this code?

    Plugin Author codepeople

    (@codepeople)

    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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘Hide Fieldset’ is closed to new replies.