Creating customize contact form
This support request was posted in BBQ by El_Pablo
- El_Pablo June 15, 2015 at 9:50 am
Hi,
I made a customized contact form, according to the info I found in former post on this forum. So I made a copy of the php.file, renamed it and made the necessary changes to it. The form looks good, but now I have 2 problems:
1) In the Nice Theme settings, I can only fill in 1 email address, but the customized form I made, has to go to another email address then the one on the contact page. How can I arrange this?
2) I have tested the customized contact form (www.tsant.be/reservaties/). I can fill in all the fields, but when I receive the email, the extra fields I added are not mentioned. How can I arrange this?
Kind regards,
Pieter
Juanfra Aldasoro June 15, 2015 at 5:02 pmHello Pieter,
Thanks for writing. The contact form included in the theme it is not meant to be extended.
You can rename the contact template and add some more fields, but you need to have in mind that any form need a special script in order to be sent (The form results are handled via AJAX, in the file /includes/ajax.php). This is not something we recommend. We recommend users to use a plugin that is meant to build forms, like contact form 7 or gravity forms. That way you would be able to create forms without having to deal with the coding.
Best,
Juan.El_Pablo June 22, 2015 at 11:37 amHi Juan,
I managed to add extra fields to the contact form and to adjust the ajax file, so everything is working well. Now I have made a second contact form, with some extra fields. I want to use this contact forms on my site as well, so my question is: How can I make the second contact form working well? Do I have to make a copy of the original ajax file, rename it, and link the second contact form to it? And how do I do this?
Regards,
PieterJuanfra Aldasoro June 22, 2015 at 2:23 pmHi Pieter,
Thanks for the follow up.
All forms displayed through the contact template use the same logic and functions. Unfortunately we can’t provide support on customizations or scripting: http://nicethemeswp.com/article/support-vs-customizations/
What I can recommend you is to check the following documentation in order to understand how AJAX requests are handled in WordPress: https://codex.wordpress.org/AJAX_in_Plugins
Best,
Juan.
You must be logged in to reply to this topic.