Home Forums Porto Template SEO theme contact form not working – okay on other themes

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #10030960
    damianwierzbicki
    Participant

    I am a beginner with HTML but have a fairly decent grasp of the very basics of HTML/CSS.

    I wish to use the new seo-demo template. I amended the contact-form.php file to include my email address and uploaded all the files to my cpanel. Everything looks okay on my site but when I fill out the contact form and click ‘submit’ nothing happens – the page just refreshes.

    I thought it must be something I am doing but then I went back and did the above again, instead this time I used the one-page-demo theme and the contact form worked perfectly – I received the email in my inbox.

    I noticed that the one-page demo has this bit of code:

    <form id=”contactForm” class=”contact-form form-style-2 pr-xl-5″ action=”php/contact-form.php” method=”POST”>

    prompting the site to use the php element but the seo-demo has this:

    <form id=”demo-form” class=”white-popup-block mfp-hide”>

    there is no reference to the php/contact-form.php anywhere in the html code for seo-demo.

    Am I missing something really simple or is there an issue with the code?



    Template Version: current
    #10030963
    damianwierzbicki
    Participant

    also, I have copied and pasted the HTML form code from the one-page-demo into the demo-seo HTML and uploaded that onto cpanel. I visited the site and the copied form works just fine on the seo theme. I’m playing around with the code now to see if I can figure something out. Hope this helps, thanks.


    #10030964
    damianwierzbicki
    Participant

    .


    #10030969
    Support2
    Keymaster

    Hello, thanks for your purchase.

    Really the contact form on the Demo SEO it’s not fully functional. We are close to release a new version of Porto and will turn this contact form functional for the next version of Porto. Sorry for this issue.

    For now please change the HTML of form to:

    <!-- Form -->
    <form id="demo-form" class="contact-form white-popup-block mfp-hide" action="php/contact-form.php" method="POST">
    	<div class="form-row mt-2">
    		<div class="col-sm-12">
    			<h2 class="font-weight-bold text-center text-7 mb-4">Get a Quote</h2>
    		</div>
    	</div>
    
    	<div class="custom-form-style-1 custom-form-style-1-rounded">
    		<div class="form-row">
    			<div class="form-group col mb-2">
    				<input type="text" name="name" class="form-control" value="" placeholder="NAME*" required>
    			</div>
    		</div>
    		<div class="form-row">
    			<div class="form-group col mb-2">
    				<input type="email" name="email" class="form-control" value="" placeholder="EMAIL*" required>
    			</div>
    		</div>
    		<div class="form-row">
    			<div class="form-group col mb-2">
    				<input type="text" name="website" class="form-control" value="" placeholder="WEBSITE*" required>
    			</div>
    		</div>
    		<div class="form-row">
    			<div class="form-group col">
    				<input type="text" name="company" class="form-control" value="" placeholder="COMPANY NAME*" required>
    			</div>
    		</div>
    		<div class="form-row">
    			<div class="form-group col mb-0">
    				<input type="submit" class="btn btn-primary btn-outline btn-rounded font-weight-semibold text-center text-4 btn-py-2 w-100 mb-3" value="Submit">
    			</div>
    		</div>
    	</div>
    
    </form>

    Add the JS script “view.contact.js” on footer of page like the code below:

    .........
    ........
    ...........
    		<script src="vendor/owl.carousel/owl.carousel.min.js"></script>
    		<script src="vendor/magnific-popup/jquery.magnific-popup.min.js"></script>
    		<script src="vendor/vide/jquery.vide.min.js"></script>
    		<script src="vendor/vivus/vivus.min.js"></script>
    		<script src="vendor/kute/kute.min.js"></script>
    		<script src="vendor/kute/kute-svg.min.js"></script>
    		
    		<!-- Theme Base, Components and Settings -->
    		<script src="js/theme.js"></script>
    
    		<!-- Current Page Vendor and Views -->
    		<script src="js/views/view.contact.js"></script>
    ....
    .....
    ......

    Please try that and let us know if you need further assistance.

    Kind Regards,

    Rodrigo.


    #10030976
    damianwierzbicki
    Participant

    Thank you. With the new code I Received the email just fine, however there are still some issues with the site just refreshing upon submission as well as the popup form seemingly not working.

    I appreciate there may be some small issues with this theme so I will use a different one-page demo while you guys iron out the issues.

    Thank you for your help.


    #10030978
    Support2
    Keymaster

    Hello,

    The code we sent for you should works fine.

    The popup should works, in our tests here with the solution it’s working.

    Regarding the page refreshing, this occurs when the script view.contact.js it’s not added on the page. This is the script that prevents the page from reload when the contact form is sent. Also makes the validation of contact form.

    Please can you send a online test link with your website for us, so we can inspect your code and help you with this.

    Kind Regards,

    Rodrigo.


Viewing 6 posts - 1 through 6 (of 6 total)