• Resolved ycsuk

    (@ycsuk)


    Hi all, just trialling the calculated form fields to do a simple weight calculation on the linked page.

    I have a question if this is possible.

    Can you set a maximum input number (for example on the projection field) based on what is selected on the radio check box fields for the Hoist load rating, so for example, if 400kg is selected, the max you can put in projection is 1000, and if 500kg is selected, the max you can put in projection is 2000?

    Many thanks

    The page I need help with: [log in to see the link]

Viewing 1 replies (of 1 total)
  • Plugin Author CodePeople2

    (@codepeople2)

    Hello @ycsuk

    Thank you so much for using our plugin.

    Yes, that’s possible, you will need a calculated field as an auxiliary.

    Insert a calculated field in the form (I’ll assume to illustrate the process, it is the fieldname123). Since it is an auxiliary, you can hide it from the form and exclude it from the submission by ticking two checkboxes in its settings. And enter the equation:

    (function(){
    if(fieldname19 == 400) return 1000;
    if(fieldname19 == 500) return 2000;
    /* the other conditions here */
    })()

    Finally, enter the name of the calculated field, in this example, the fieldname123, through the “max” attribute if the number field settings.

    Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Maximum inputs based on check box’ is closed to new replies.