Create Additional Submit Button

By: Russell Guilfoile | Asked: 11/28/2022
ForumsCategory: Code HelpCreate Additional Submit Button
Russell Guilfoile asked 1 year ago
How would you create an additional submit button that:
  • submits form
  • redirects to a url
  • conditionally appears only when field ID 243 does not equal blank
Basically all I have is the code for the existing submit button. <button class="frm_button_submit" type="text" [button_action]>Back To Dashboard</button> The reason for a second submit button is because I want the text of the button and the redirect to be different depending on values selected in the form. Thanks in advance for any help.
2 Answers
Bobby Clapp answered 1 year ago
You want 2 submit buttons on one page? If you just want to change the submit button as it is, you can change the settings to redirect to a url as you wish. As for the button showing or not, look here ->
Russell Guilfoile replied 1 year ago

I need two different buttons. the two buttons have different conditional logic, different labels, and different redirects.

Bobby Clapp replied 1 year ago

As per Victor's message below. You can write your own logic however you choose with JS/JQuery. You can add additional buttons in the "customize HTML" of the form. It will require a little code and some knowledge of HTML/CSS.

Russell Guilfoile replied 1 year ago

Ok. I'll see what I can do. Thanks.

Victor Font answered 1 year ago
You can have any button use jQuery to execute a form.submit().
Russell Guilfoile replied 1 year ago

Can conditional logic be coded in?

Victor Font replied 1 year ago

If you mean "conditionally appears only when field ID 243 does not equal blank", then yes. Monitor the change event for field 243 and display the button if it's not blank. Hide the button if it reverts back to blank.

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