• Resolved jojo2208

    (@jojo2208)


    Hi, I have a landing page with 2 payment formulas. I have create 2 different forms for each formula. How can I display a specific form depending on the button the user clicked on the landing page?
    Is it possible to display the form like a pop up rather than redirecting to another page?

    Thank you.

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

    (@codepeople)

    Hello @jojo2208

    Actually, your questions are not about our plugin. The buttons are on the page, not in the form. Our plugin creates the forms.

    So, assuming you have two buttons on the page inserted by yourself. You can insert the forms’ shortcodes (I’ll assume the forms’ ids are 1 and 2, respectively) into div tags hidden by default:

    <div id="form-a" style="display:none">[CP_CALCULATED_FIELDS id="1"]</div>
    
    <div id="form-b" style="display:none">[CP_CALCULATED_FIELDS id="2"]</div>

    Now, the buttons onclick events would be:

    <button type="button" onclick="jQuery('#form-b').hide();jQuery('#form-a').show();">Form A</button>
    
    <button type="button" onclick="jQuery('#form-a').hide();jQuery('#form-b').show();">Form B</button>

    However, as I said above these buttons are not part of our plugin. Our plugin creates the forms.

    Best regards.

Viewing 1 replies (of 1 total)

The topic ‘Display form depending button’ is closed to new replies.