• Resolved klippstrom

    (@klippstrom)


    Hi! Our subscription form (shown on each post) is not working properly. Firstly, the field for gender isn′t working at all. Secondly, the other dropdown fields (interest and location) fails to work sometimes (randomly?), ie nothing can be chosen. So no new subscribers since mid-March. Help?

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Stefano Lissa

    (@satollo)

    The field not showing seems a list selection fields (probably you form is built using the Newsletter shortcodes). Try to check if you have at least one list set as public and/or if the shortcode generating that list selection has some lists IDs specified.

    Stefano.

    Thread Starter klippstrom

    (@klippstrom)

    Thanks for the answer Stefano, but I don′t understand. I have nothing called “Public” in the Fields. Now I rebuild everything again, and everything seems to work except this strange, empty dropdown option. I don′t know what “the shortcode generating that list selection has some lists IDs specified” ??

    Plugin Author Stefano Lissa

    (@satollo)

    Hi, how is the subscription form built? That is not a standard form, so it is injected in your post in some way.

    Thread Starter klippstrom

    (@klippstrom)

    I am not a programmer, so I am not sure what you mean with “built”. I just used the tab “Extra profile fields” that come with the plugin. And I added them to the bottom of every content posting with the widget “Newsletter”. (And everything worked perfectly fine until the last update of the Newsletter plugin.)

    I took a look at it. The Subscription page uses the <p>{subscription_form}</p> code.
    In the SUBSCRIPTION FORM FIELDS AND LAYOUT > Main profile fields, there is nothing special

    https://www.vekn.net/tmp/subplugin1.png

    However, the generated form has an extra field called ‘tnp-lists’ that has no options

    <form method="post" action="https://www.blackchantry.com/?na=s">
    
    <input type="hidden" name="nr" value="widget"><input type="hidden" name="nlang" value=""><div class="tnp-field tnp-field-firstname"><label for="tnp-name">First name</label>
    <input class="tnp-name" type="text" name="nn" value="" required=""></div>
    <div class="tnp-field tnp-field-surname"><label for="tnp-surname">Last name</label>
    <input class="tnp-surname" type="text" name="ns" value="" required=""></div><div class="tnp-field tnp-field-email"><label for="tnp-email">Email</label>
    <input class="tnp-email" type="email" name="ne" value="" required=""></div>
    <div class="tnp-field tnp-field-gender"><label for="tnp-sex">I'm</label>
    <select name="nx" class="tnp-gender" id="tnp-gender" required=""><option value=""></option><option value="n">Not specified</option><option value="f">Woman</option><option value="m">Man</option></select></div>
    <div class="tnp-field tnp-lists"><select class="tnp-lists" name="nl[]" required=""></select></div><div class="tnp-field tnp-field-profile">...</div><div class="tnp-field tnp-field-button"><input class="tnp-submit" type="submit" value="Subscribe">
    </div>
    </form>

    https://www.vekn.net/tmp/subplugin2.png

    Ok, found it.

    If there is no list at all defined in LIST BUILDING > Lists, then there is the bug. That is because ‘no list’ implies ‘no public list’, and the code in the newsletter\subscription\subscription.php file does not handle properly this case.

    line 1419 should be: if ($lists.length > 0 && isset($attrs['layout']) && $attrs['layout'] === 'dropdown') {

    instead of if (isset($attrs['layout']) && $attrs['layout'] === 'dropdown') {

    Plugin Author Stefano Lissa

    (@satollo)

    Thank you!

    Stefano.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Subscribe form is not working’ is closed to new replies.