Title: Display form depending button
Last modified: October 4, 2023

---

# Display form depending button

 *  Resolved [jojo2208](https://wordpress.org/support/users/jojo2208/)
 * (@jojo2208)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/display-form-depending-button/)
 * 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](https://wordpress.org/support/users/codepeople/)
 * (@codepeople)
 * [2 years, 8 months ago](https://wordpress.org/support/topic/display-form-depending-button/#post-17100362)
 * Hello [@jojo2208](https://wordpress.org/support/users/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:
 *     ```wp-block-code
       <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:
 *     ```wp-block-code
       <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.

 * ![](https://ps.w.org/calculated-fields-form/assets/icon-256x256.jpg?rev=1734377)
 * [Calculated Fields Form](https://wordpress.org/plugins/calculated-fields-form/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/calculated-fields-form/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/calculated-fields-form/)
 * [Active Topics](https://wordpress.org/support/plugin/calculated-fields-form/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/calculated-fields-form/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/calculated-fields-form/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [codepeople](https://wordpress.org/support/users/codepeople/)
 * Last activity: [2 years, 8 months ago](https://wordpress.org/support/topic/display-form-depending-button/#post-17100362)
 * Status: resolved