• Resolved Alwin

    (@wp-opti)


    I have build 3 forms for 1 website. The 3 forms are running on seperate pages:

    form 1:
    https://www.fotoloek.nl/printen/
    form 2:
    https://www.fotoloek.nl/canvas/
    form 3:
    https://www.fotoloek.nl/chromaluxe/

    I also build a page with all 3 forms on this one page. But somehow some functions in the forms are not working when all 3 forms are on 1 page?

    Is this a common issue?

    I use the Enfold theme, and place the short code in a “code block” in the page. So on this particular page (which is offline now) I used 3 codeblocks with the shortcodes in it.

    Thank you for your help!

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

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

    (@codepeople)

    Hello @wp-opti,

    To help you I need to check the webpage that is failing, please, set this page online and send me its URL.

    Best regards.

    Thread Starter Alwin

    (@wp-opti)

    Of course ??

    Please llok at https://www.fotoloek.nl/test/

    The forms called Canvas and Chromaluxe seems to be working okay

    The form called Printen is not working okay: please enter some numbers in the fields “Korte zijde foto” and “lange zijde foto” and then choose “Glans?zijdemat in the next checkbox.

    Now you see the price for Glans/Zijdemat which is good, but the totalprice (Prijs totaal) is empty.

    When you do the same thing on this page: https://www.fotoloek.nl/printen/
    you will see that the Total price field is working fine.

    I don’t understand because it is the exact same form, using the same page template and of course the same form short-code.

    When I delete the forms Canvas and Chromaluxe, then the Print form is working fine. So it seems that all 3 forms running on this 1 page is not possible?

    Plugin Author codepeople

    (@codepeople)

    Hello @wp-opti,

    There is not an issue with the plugin, the issue is caused by the forms’ implementation, in the form 9 there is a “HTML Content” field with the code:

    
    <script>
    fbuilderjQuery(document).on('change', '[id*="fieldname15_"],[id*="fieldname16_"]', function(){
    var e=fbuilderjQuery(this);
    if(e.val()%5 != 0) e.val('').change();
    });
    </script>
    

    But the “Prijs totaal” field in the form 1 has the name fieldname16, so it is being affected too by the piece of code in the form 9 when both forms are inserted in the same page.

    The solution:

    1. Assign an unique class name to the fields: fieldname15 and fieldname16 in the form 9, for example: my-special-fields

    Note: the class names are assigned to the fields through their attributes “Add CSS Layout Keywords”

    2. Edit the previous piece of code as follows:

    
    <script>
    fbuilderjQuery(document).on('change', '.my-special-fields input', function(){
    var e=fbuilderjQuery(this);
    if(e.val()%5 != 0) e.val('').change();
    });
    </script>
    

    and that’s all.
    Best regards.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘3 form on 1 page not working?’ is closed to new replies.