New Landing How can we help? Themeforest Theme Support Neighborhood Issue with Newsletter form in header

Viewing 14 posts - 1 through 14 (of 14 total)
  • #83854
    lobbybros
    Member
    Post count: 52

    Hello,

    I have created a form using mailchimp for the newsletter dropdown in the top bar menu but the submit button doesn’t work. This is the code I am using (generated by MailChimp):

    <p align="center"><b>ISCRIVITI ALLA NEWSLETTER</b>!<br>ricevi ogni mese buoni sconto! </p><p>Il modo migliore per conoscere prima di tutti i nostri regali pensati per te!</p>
    
    <p align="center">
    <input type="checkbox" name="_mc4wp_lists[]" value="9341c27062"  /> Uomo
    &nbsp;&nbsp;&nbsp;  <input type="checkbox" name="_mc4wp_lists[]" value="0a7f848bf2" /> Donna  </p>
     <p>   <input required="required" placeholder="Nome" name="FNAME" type="text">
    </p><p>
    <p>
    	<input type="email" id="mc4wp_email" name="EMAIL" required placeholder="[email protected]" />
    </p>
    <label><input type="submit"  value="Iscriviti" />
        </label>

    Any ideas as to why?

    Thks!

    #83989
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    You input button doesn’t look right, ours is this:

    <div class="clear"><input type="submit" value="Subscribe" name="subscribe" id="mc-embedded-subscribe" class="button" style="visibility:hidden;"></div>

    Please check your code

    – Kyle

    #84196
    lobbybros
    Member
    Post count: 52

    Tried modifying the button as advised but still nothing…

    #84350
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    When you get the code from mailchimp, which option are you selecting out of these 3?

    – Kyle

    #84676
    lobbybros
    Member
    Post count: 52

    We didn’t actually use that screen, but rather the MailChimp plugin for WordPress, so we made up the forms from our site’s backend rather than through the MailChimp site. Could that be it?

    #84684
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Yes, the best way is to use the ‘Embedded forms’ feature on the mailchimp site itself

    – Kyle

    #85001
    lobbybros
    Member
    Post count: 52

    Hello,

    I contacted the MailChimp for WP plugin developer and explained the situation. Basically, his plugin works with shortcode, not with html, which is why submit isn’t working. However, given that in the header it is not possible to insert shortcode, he advises as follows:

    “The easiest thing would be to contact the theme author and tell him to wrap the header fields in a call to the following function.
    <?php echo do_shortcode( $header_field ); ?>
    This will allow the use of shortcodes inside the header fields, I’m sure he will understand the specific code that’s needed. It’s a change he can do in a few minutes.”

    Is this something that would be possible to do?

    #85009
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    Hi

    Replace sf-header.php with:

    https://www.dropbox.com/s/rzu5drdacplfph3/sf-header.php.zip

    Please note that the output may not be as expected

    – Kyle

    #85028
    lobbybros
    Member
    Post count: 52

    Thks for yr reply! However the file unzips as an alias, not as a php file…can you try sending it again? thks!

    #85032
    Kyle – SUPPORT
    Moderator
    Post count: 35880
    #85231
    lobbybros
    Member
    Post count: 52

    Hi Kyle, shortcode is working now! Thks!

    Just one question: can you let me know which lines you worked on and what specific code you added, so I can add it to my old file (I had made some modifications of my own).

    Thks again a kind regards!

    #85240
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    On line 693 (maybe different after your edits) edit this line:

    $aux_links_output .= $sub_code . "\n";

    to:

    $aux_links_output .= do_shortcode($sub_code) . "\n";

    – Kyle

    #85245
    lobbybros
    Member
    Post count: 52

    Thks for your help!
    Very useful.

    #85256
    Kyle – SUPPORT
    Moderator
    Post count: 35880

    No problem 🙂

    – Kyle

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

You must be logged in and have valid license to reply to this topic.

License required for one of the following items
Login and Registration Log in · Register