Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • #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.



    Are you trying to copy the html rendered by the shortcode? You can just copy the contact form shortcode:

    [av_contact email=' (Email address hidden if logged out) ' button='Submit' title='Send us mail' sent='Your message has been sent!' autorespond='' captcha='']
    [av_contact_field label='Name' type='text' check='is_empty']
    [av_contact_field label='E-Mail' type='text' check='is_email']
    [av_contact_field label='Subject' type='text' check='is_empty']
    [av_contact_field label='Message' type='textarea' check='is_empty']

    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>





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

The topic ‘Contact Form in Template?’ is closed to new replies.