• Resolved radu88

    (@radu88)


    Hey there!

    I’d like to start by apologizing for the long post πŸ™‚

    So, we’ve been using your plugin (really nice!) and after reading a lot of questions on the forum we’ve pretty managed to get it where we want it.

    Unfortunately, it’s still being done locally, so hopefully you can give us a hand.

    An overview of the form is here – https://prnt.sc/ukqbnj
    Once you put in your weight, gender and body fat we have a ‘baseline’ calculator that’s hidden – see https://prnt.sc/ukqcc2

    Then, after Suit type and Water, we have another ‘middle calculator’ (not sure if it’s the right way, but it worked) – see https://prnt.sc/ukqcvl

    Then again, after Tank type and Experience level dropdowns, we have another middle calculator – see https://prnt.sc/ukqdks

    Lastly, we have the Old or new wetsuit dropdown menu.

    The ‘middle calculator’ and the baseline are not visible to the frontend

    The final field (which will be hidden/removed) takes into consideration the ‘final middle calculator’ + the options for the old/new suit and generates the number – see https://prnt.sc/ukqeby

    Up until this point, everything works perfectly, whoho!

    Once you add in weight and select dropdown menu options and hit the calculate button, something like this appears -https://prnt.sc/ukqfnf

    The calculate button has the onclick event set to jQuery('.my-field').removeClass('hide'); and the text that’s outputed looks like this – https://prnt.sc/ukqgs0 and https://prnt.sc/ukqgye

    Now, the questions:
    1 – If I click the RESET button, it resets the values of the form, but can it also hide the text that’s being outputed? Basically, the text result above Calculate button would be removed / hidden until new values and click of the Calculate button gets triggered again;
    2 – If I get a result after pressing calculate and then I change the dropdown values, can the text result above the calculate be hidden automatically, thus forcing the user to click the button again?

    Thank you very much and apologize for the long post!

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

    (@codepeople)

    Hello @radu88

    If you want to hide the field by pressing the reset button, enter as its onclick event the piece of code:

    
    jQuery('.my-field').addClass('hide');
    

    If you want to hide the field if the use select or enter new values, insert an “HTML Content” field in the form with the following piece of code as its content:

    
    <script>
    jQuery(document).on('change', '#fbuilder :input', function(){jQuery('.my-field').addClass('hide');});
    </script>
    

    Best regards.

    Thread Starter radu88

    (@radu88)

    @codepeople – Above codes work perfectly, thank you so much!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Few questions’ is closed to new replies.