• Resolved MikkelCrunch

    (@mikkelcrunch)


    Hi,

    I don’t know why I can’t get it running.

    I have older Forms where on a HTML Field and on the Summary Field are inline styles “display: none;” (in the Frontend) and on click the inline style disappears so the fields getting visible.

    On the new Form, we copied it, there is no “hide” option.

    Was this removed, or am I just not remembering how I did this?

    On this Form it is working:
    https://autorevue.at/ratgeber/kilometergeld?1714064705

    On this new one it doesn′t:
    https://autorevue.at/ratgeber/bremsweg-berechnen?1714064744

    So, basically what I really would like: A fieldset with a bunch of fields in it – HTML and Summary fields. This should be initially hidden, after press Button, this fieldset should show.

    Thanks for your help in advance.

    Best regards
    Mikkel

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

    (@codepeople)

    Hello @mikkelcrunch

    In your first form, you configured the fields as dependent on the radio button choices and calculated field results. Please read the following blog post:

    https://cff.dwbooster.com/blog/2020/03/01/dependencies

    The second form does not have dependencies defined.

    Best regards.

    Thread Starter MikkelCrunch

    (@mikkelcrunch)

    Hi,

    thank you for your fast reply.

    On the first there are radio buttons for different input fields.

    The second does not have such choices.

    So, there I need the described solution.

    Will this described in the links you posted?

    Thanks for your help.

    Best regards

    Mikkel

    Plugin Author codepeople

    (@codepeople)

    Hello @mikkelcrunch

    If your second form does not contain radio buttons, you can define the dependencies by using calculated fields.

    However, if you only want to hide and show the fields, you can assign the hide class name to the fields you want to hide. You can assign the class names to the fields through their “Add CSS Layout Keywords” attributes. To display a field that was hidden with the hide class name by pressing a button instead of using dependencies (Ex. the fieldname123 field), you can call the SHOWFIELD operation as the button onclick event. Ex.

    SHOWFIELD('fieldname123');

    Best regards.

    Thread Starter MikkelCrunch

    (@mikkelcrunch)

    Hi,

    that was it – thank you very much for your Help.

    SHOWFIELD(‘fieldname123’); as simple as it gets.

    I hope it is ok, if I put in here a following Question.

    The one input field is marked as “required”, but if the user presses now the calculate button, it puts out the initial hid field with results of 0.

    Is there an option too for example a greyed out button, or just a standard form message “Please fill out”?

    Thanks in advance
    Best regards Mikkel

    Plugin Author codepeople

    (@codepeople)

    Hello @mikkelcrunch

    If you want to evaluate the equations only if the required fields were filled and the entered fields are valid, you can do the following:

    1. Configure the button type as “button” instead of a calculated field.
    2. Enter the following piece of code as its onclick event:
    
    if(VALIDFORM(this.form)){
       EVALEQUATIONS(this.form);
       SHOWFIELD('fieldname123');
    }

    The SHOWFIELD code is to display the summaries.

    Best regards.

    Thread Starter MikkelCrunch

    (@mikkelcrunch)

    Hi @codepeople,

    you are amazing! Thank you very much for your help.

    It works perfectly!

    Best regards
    Mikkel

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Show Labels of Summary Field after pressing “Calculate”’ is closed to new replies.