WordPress.org

Ready to get started?Download WordPress

Forums

Submit button not working (10 posts)

  1. mybunnygoboom
    Member
    Posted 2 years ago #

    Hi everybody,

    On the footer of the home and core pages of http://www.miamiweddingsandevents.com we have a newsletter signup. It's in there as a table, but no code to actually submit it. Is there a plugin that will help with this, or can somebody help me out with where to locate the code to make this work? I'm just now beginning to work on the site, and I worry how many potential contacts have been lost with this not working.

    The existing code is as follows

    <table><tr><td><img src="<?php bloginfo('stylesheet_directory'); ?>/images/newsletter.png"/></td><td><input type="text" value="Receive Our Latest Promotion..." onblur="if(this.value=='')this.value='Receive Our Latest Promotion...';" onfocus="if(this.value=='Receive Our Latest Promotion...')this.value='';" /></td><td><input type="image" src="<?php bloginfo('stylesheet_directory'); ?>/images/btn_submit.png" /></td></tr></table>
    </div>

    The blog I need help with is http://www.miamiweddingsandevents.com.

  2. Chandan Kumar
    Member
    Posted 2 years ago #

    For working newsletter :
    1. You will have to create form
    2. Implementation of form field validation in JQuery
    3. Submit page for the form to send mail and save record

    So do you want me to guide.

  3. David Choi
    Member
    Posted 2 years ago #

    I see the code only has <input>, not a form. If you want visitors email sent to your email, so you can copy/paste later, just a form plugin like:

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

    just create a form, the copy and paste generated shortcode on your landing page.

    Or you can use a 3rd party solution (recommended) like this

    http://kb.mailchimp.com/article/how-to-add-a-mailchimp-signup-form-to-your-wordpress-blog/

    it's free up to 2K users, and your site's domain won't run the risk to be added to the spammer blacklist, because the newsletters will be sent from these services, not from your site.

  4. mybunnygoboom
    Member
    Posted 2 years ago #

    Ok I have generated a form with Contact Form 7, but where do I place the code to have it work properly?

  5. David Choi
    Member
    Posted 2 years ago #

    That depends, because if your landing page is a WordPress page, then you can paste it there by inserting the code (the id number differs):

    [contact-form-7 id="1"]

    But if it's a php file, like home.php, then you have to paste it there instead using PHP code like:

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

  6. mybunnygoboom
    Member
    Posted 2 years ago #

    Yikes, I tried this (it's a php file, the footer in the theme) and it just put the contact form below the table, which made things look pretty FUBAR.

  7. David Choi
    Member
    Posted 2 years ago #

    I think the id form number isn't correct, because it says

    [contact-form-7 404 "Not Found"]

  8. mybunnygoboom
    Member
    Posted 2 years ago #

    Yeah I fixed that, but it puts my form underneath, whereas I want it to use the table as the form.

    Wpthemes, I was looking at your blog, very nice work!

  9. mybunnygoboom
    Member
    Posted 2 years ago #

    This is the updated code in case it helps:

    <table><tr><td><img src="<?php bloginfo('stylesheet_directory'); ?>/images/newsletter.png"/></td><td><input type="text" value="Receive Our Latest Promotion..." onblur="if(this.value=='')this.value='Receive Our Latest Promotion...';" onfocus="if(this.value=='Receive Our Latest Promotion...')this.value='';" /></td><td><input type="image" src="<?php bloginfo('stylesheet_directory'); ?>/images/btn_submit.png" /></td></tr></table>
    <?php echo do_shortcode( '[contact-form-7 id="716" title="Contact form 1"]' ); ?>

  10. David Choi
    Member
    Posted 2 years ago #

    Any reason to use the table? Because it's going to be hard to customize it via CSS. It's recommended to use CSS to do everything, re-positioning the elements and changing the colors etc.

    And thanks for visiting my site.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags