• Resolved malpica

    (@malpica)


    Hi,
    I need some help for my form.

    I have one radiobutton field and eight number fields. I want if my client check radio button all fields number get vaulue= 100, but if my client does not check radio button, each field number can be populate by my client.

    Finally I make operations with this values

    Best regards

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

    (@codepeople)

    Hello @malpica,

    I’ll try to explain the process with an example:

    – Assuming that your radio button field is the fieldname1, and the other fields are:

    fieldname2, fieldname3, fieldname4, fieldname5, fieldname6, fieldname7, fieldname8 and fieldname9

    – Insert a “HTML Content” field in the form with the following piece of code as its content:

    <script>
    jQuery(document).on('change', '[id*="fieldname1_"]', function(){
    var $ = jQuery;
    $('[id*="fieldname2_"]').val(100).change();
    $('[id*="fieldname3_"]').val(100).change();
    $('[id*="fieldname4_"]').val(100).change();
    $('[id*="fieldname5_"]').val(100).change();
    $('[id*="fieldname6_"]').val(100).change();
    $('[id*="fieldname7_"]').val(100).change();
    $('[id*="fieldname8_"]').val(100).change();
    $('[id*="fieldname9_"]').val(100).change();
    });
    </script>

    and that’s all.
    Best regards.

Viewing 1 replies (of 1 total)
  • The topic ‘populate field number’ is closed to new replies.