Tagged: CONTACT FORM, templates
-
AuthorPosts
-
July 27, 2013 at 9:59 pm #26826
I’m trying to insert the contact form in my template file.
I generated a form in the editor, and then copied the code it output, and dropped that into my template file. But when I remove the shortcode from the editor the form in the template no longer works.
do_shortcode will not help here either since I want to build in some hidden fields to pass data along through.
July 29, 2013 at 5:13 am #131758Hi,
Are you trying to copy the html rendered by the shortcode? You can just copy the contact form shortcode:
[av_contact email=///' button='Submit' title='Send us mail' sent='Your message has been sent!' autorespond='' captcha='']<br /> [av_contact_field label='Name' type='text' check='is_empty']<br /> [av_contact_field label='E-Mail' type='text' check='is_email']<br /> [av_contact_field label='Subject' type='text' check='is_empty']<br /> [av_contact_field label='Message' type='textarea' check='is_empty']<br /> [/av_contact]
This is the actual HTML input
<form action="http://localhost/kriesi/enfold/?page_id=2307" method="post" class="ajax_form avia-builder-el-0 avia-builder-el-no-sibling " data-avia-form-id="1"><fieldset><h3>Send us mail</h3><p class='' id='element_avia_name_1'><label for="avia_name_1">Name <abbr class="required" title="required">*</abbr></label> <input name="avia_name_1" class="text_input is_empty" type="text" id="avia_name_1" value=""/></p><p class='' id='element_avia_e-mail_1'><label for="avia_e-mail_1">E-Mail <abbr class="required" title="required">*</abbr></label> <input name="avia_e-mail_1" class="text_input is_email" type="text" id="avia_e-mail_1" value=""/></p><p class='' id='element_avia_subject_1'><label for="avia_subject_1">Subject <abbr class="required" title="required">*</abbr></label> <input name="avia_subject_1" class="text_input is_empty" type="text" id="avia_subject_1" value=""/></p><p class='' id='element_avia_message_1'> <label for="avia_message_1" class="textare_label hidden textare_label_avia_message_1">Message <abbr class="required" title="required">*</abbr></label> <textarea name="avia_message_1" class="text_area is_empty" cols="40" rows="7" id="avia_message_1" ></textarea></p><p class="hidden"><input type="text" name="avia_avia_username_1" class="hidden " id="avia_avia_username_1" value="" /></p><p class=""><input type="hidden" value="1" name="avia_generated_form1" /><input type="submit" value="Submit" class="button" /></p></fieldset></form><div id="ajaxresponse_1" class="ajaxresponse ajaxresponse_1 hidden"></div>
Regards,
IsmaelAugust 1, 2013 at 1:46 am #131759Thanks
-
AuthorPosts
- The topic ‘Contact Form in Template?’ is closed to new replies.