Custom Next and Submit Buttons

By: David Calderon | Asked: 06/20/2022
ForumsCategory: Code HelpCustom Next and Submit Buttons
David Calderon asked 2 years ago
Hello,   I would like to know if there is a way to have an external button affect a conversational form. So similar to how the next button allows you to go to the next question in your form, I need an external button (outside of the confines of the form) to do the same. I would also like to know how to hide the next button that exists within the form so as to eliminate duplication. Can this also be done with the submit button? Any help you can provide would be greatly appreciated. Thank you!
Bobby Clapp replied 2 years ago

So realistically you want to change what the button looks like or is there more to it than that?

David Calderon replied 2 years ago

Hello Bobby, thank you so much for asking!

What I am attempting to do is to break out the continue and submit buttons so that when those buttons are clicked they can trigger an animation with the Revolution Slider plugin but also move to the next page of the form or submit the form. Currently, since the form is loaded on the slide via a shortcode, I can't get it to trigger an animation only when the submit button or continue button are pressed. Instead, if I click anywhere on the form, an animation is triggered because it is tied to the shortcode as a whole and so anything rendered from the shortcode will trigger the animation. I hope that makes sense?

Thank you for anything you can do to help!

David

Bobby Clapp replied 2 years ago

So you sort of have a slider within a slider then. Why is the conversational form within Revolution Slider?

David Calderon replied 2 years ago

Yes, sort of. The conversational form I am using to break apart the ordering process while revolution slider is being used to highlight the part of the item they are ordering that will be affected by the response they are entering at that moment. The revolution slider portion is essentially being used for illustrative purposes. The form itself is being used to order the item displayed on revolution sliders.

Thank you! 🙂

1 Answers
Best Answer
Victor Font answered 2 years ago
You can use jQuery to alter submit button behaviors to execute an action before proceeding to the actual form submit. Both previous and next buttons trigger a form submit action. Here's an article I wrote in 2016 that explains the process. There is example code that changes the default submit button behavior to run an Ajax routine and if successful, submit the form. You can use this exemplar to model your button's behavior. You'll have to figure our how to access the Revolution Slider API to trigger the change you want. https://victorfont.com/formidable-pro-invoke-ajax-submit/

Making the Best WordPress Plugin even better - Together

Take on bigger projects with confidence knowing you have access to an entire community of Formidable Experts and Professionals who have your back when the going gets tough. You got this!
Join the community
crossarrow-right