Form Success Message

Issues related to forms.
Post Reply
Abelo
 
 
Posts: 3
Joined: Fri Jan 05, 2018 5:45 am
Location: Addis Ababa, Ethiopia

Form Success Message

Post by Abelo »

Hi there is there a way to just show a pop up success/Error msg when clicking submit button instead of taking the user to a different success/Error page? If so please explain how
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Form Success Message

Post by Pablo »

There is no standard solution for this because PHP cannot trigger a popup directly.
But you can use events (onsubmit) to submit the form and then trigger a popup.
Abelo
 
 
Posts: 3
Joined: Fri Jan 05, 2018 5:45 am
Location: Addis Ababa, Ethiopia

Re: Form Success Message

Post by Abelo »

Ok thank you!
User avatar
ruel.lago22
 
 
Posts: 59
Joined: Thu Feb 01, 2018 11:32 am

Re: Form Success Message

Post by ruel.lago22 »

Pablo wrote: Sun Oct 14, 2018 3:05 pm But you can use events (onsubmit) to submit the form and then trigger a popup.
I don't find "onsubmit" in the events option. Plus it's impossible to trigger a popup because it will take you to the success/error page after submission or if no redirection set, it will just show you a blank page with the same URL. I was hoping to trigger next page on my carousel form after submission but it seems not to work :(
User avatar
Pablo
 
Posts: 21574
Joined: Sun Mar 28, 2004 12:00 pm
Location: Europe
Contact:

Re: Form Success Message

Post by Pablo »

The onsubmit event is in the form's even list.

To display a popup you will have have to write a function that submits the form and then displays a popup.
https://blog.teamtreehouse.com/create-ajax-contact-form
Post Reply