Add Gravity Form to button

Im trying to add a gravity form to a buton to popup when clicked. How would you do this?

Thanks,
Johanthan

Hi Johanthan,

Thanks for reaching out.

You can add your gravity form shortcode within the modal element within the builder, but it may cause issue as it’s not fully integrated for that setup especially it uses ajax. For that, I recommend checking this https://docs.gravityforms.com/displaying-form-within-modalpopuplightbox/ and implement it that way.

Thanks!

What about if I use the side feature in the builder? Would that work better?

Also can you tell me where I would put this? Like the class or ID area? Can you show me an example what it should look like?

Hi again,

You can use ConvertPlus extension to show your form in a popup. To do this first install the ConvertPlus extension by navigating to X/Pro > Validations page (see screenshot)

In WP dashboard go to ConverPlus > Modal Popup and create a blank modal (see screenshots)

Add your gravity form shortcode in the modal content (see screenshot)

Then go to Behavior > Manual Display tab and add a class formModal in the Launch With CSS Class field (see screenshot)

Save and publish your modal. You can now add a Button element in Cornerstone and give it a same class formModal you’ve given to the modal to open up your form on button click. In the button URL field add javascript:void(0); to stop the jumping effect on click (see screenshot)

To learn more about ConverPlus extension please see https://theme.co/apex/forum/t/extension-convertplus/66

Hope this helps!

I got it to work! Thank you so so much.

You’re welcome! :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.