WordPress.org

Ready to get started?Download WordPress

Forums

Contact Form 7
[resolved] HTML code for contact form (10 posts)

  1. nicnack
    Member
    Posted 1 year ago #

    Hi ~ how can I grab the actual code generated if I want to hard code it into a page? thanks!

    http://wordpress.org/extend/plugins/contact-form-7/

  2. buzztone
    Member
    Posted 1 year ago #

    I am not clear what you are looking for from your question.

    However if you want the output HTML code you just need to view the Page Source Code (Firefox > Web Developer > Page Source) on the live page and look through the HMTL for the form.

  3. nicnack
    Member
    Posted 1 year ago #

    yes that's what I mean, however because my form includes Captcha, when I look at the source code, it does not show the lines of dynamic script. So, is there a way I can see the code including the dynamic script that calls for the Captcha?

  4. buzztone
    Member
    Posted 1 year ago #

    Captcha is done via Javascript. You would need to hunt that down in the various Javascript links in the Head section of the page source.

    Can't understand why you would want to "hard that code it into a page". If you just add the relevant forms CF7 shortcode to your page, the CF7 plugin adds all the necessary code.

  5. nicnack
    Member
    Posted 1 year ago #

    its because I want it in my footer which is not widgetized .. however at this point I think that's what Im going to do rather than hardcode it in. thanks!

  6. buzztone
    Member
    Posted 1 year ago #

    In that case I would just put the CF7 shortcode in the footer template file - probably called "footer.php".

    If this resolves your question, it helps others contributing here, if you can flag your post as [resolved].

  7. nicnack
    Member
    Posted 1 year ago #

    you mean, I can put a shortcode in to footer.php?? I didn't know that!

  8. nicnack
    Member
    Posted 1 year ago #

    nope..

    [contact-form-7 id="617" title="capta contact form"]
    in a php file just translates as text content

  9. buzztone
    Member
    Posted 1 year ago #

    You need to use the following:

    <?php echo do_shortcode( '[contact-form-7 id="617" title="capta contact form"]' ); ?>

    See Contact Form 7 - FAQ http://contactform7.com/faq/#Can_I_embed_a_contact_form_into_my_template_file

    You may have do a little Google searching for a bit more detail on how to do it your specific case, but the technique definately works.

  10. nicnack
    Member
    Posted 1 year ago #

    thanks!!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.