Home Forums Porto Template Popup form success message

  • This topic has 2 replies, 2 voices, and was last updated 1 week ago by leogd. This post has been viewed 55 times
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #10031813
    leogd
    Participant

    Hello!

    I’m setting up a popup form im my site. The problem is that every time someone fills the form, it redirects to a page saying success in html.

    How can I make it stay at the same page and only appear a success message on top?

    Thank you


    #10031818
    Support
    Keymaster

    Hi,

    Add the contact-form class in the form and also set the error message:

    <form id="demo-form" class="white-popup-block mfp-hide contact-form" action="php/contact-form-entre-contato.php" method="POST"> 
    	<div class="contact-form-success alert alert-success d-none mt-4" id="contactSuccess">
    		<strong>Successo!</strong> Sua mensagem foi enviada.
    	</div>
    	<div class="contact-form-error alert alert-danger d-none mt-4" id="contactError">
    		<strong>Error!</strong> There was an error sending your message.
    		<span class="mail-error-message text-1 d-block" id="mailErrorMessage"></span>
    	</div>

    That will make the ajax request to your “php/contact-form-entre-contato.php” file which must return with success/error.

    Best Regards.


    #10031819
    leogd
    Participant
    This reply has been marked as private.
Viewing 3 posts - 1 through 3 (of 3 total)