• Resolved makyn

    (@makyn)


    I have three forms on one page. Each form uses different fieldnames. Is it possible to reference these other fieldnames on the same page to populate the calculated field there?

    I need to input the “Suggested Retail Price” fieldname8 from the first calculator (class=”artcraftcalc”) dynamically into the second calculator (class=”feecalc”) in the first field fieldname34.

    Then, I am trying to dynamically include the “Cost Per Product” (fieldname1) from the first calculator (class=”artcraftcalc”) into the third calculator (class=”profitcalc”).

    I have tried to add the fieldnames into calculated fields, like so: PREC(fieldname8,2)

    Is it possible that you can help with this or provide really good guidance on how to accomplish this?

    Thank you in advance for your assistance!

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

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

    (@codepeople)

    Hello @makyn

    Thank you very much for using our plugin.

    If the fields belong to different forms, you cannot refer to them directly by their names in the equations. You should fill the fields in the second and third forms with jQuery or javascript.

    For example, you can insert an HTML Content field in the second calculator and enter the following piece of code as its content:

    <script>
    jQuery(document).on('change', '.artcraftcalc [id*="fieldname8_"]', function(){
    jQuery('.feecalc [id*="fieldname34_"]').val(this.value).change();
    });
    </script>

    And repeat the process with the third form. But this time using the corresponding class and fields names.

    Best regards.

    Thread Starter makyn

    (@makyn)

    CodePeople, thank you for the lightning fast response & superb technical assistance!

    You are awesome!!

    That worked like a charm & I was able to get the other fields working properly too based upon your advice! This will definitely help eliminate some user errors!

    I cannot thank you enough for your help with this!
    Much appreciated!!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Three forms & using fields dynamically on same page’ is closed to new replies.