WordPress.org

Ready to get started?Download WordPress

Forums

Knews Multilingual Newsletters
[resolved] Subscribe without type email (5 posts)

  1. Ole Aggerholm
    Member
    Posted 1 year ago #

    Hi,

    I have made a number of mail lists there are not open for public, anyway I can trick knews to auto fill out the email / hide the email field? I already have the email on the user record.

    Ole

    http://wordpress.org/extend/plugins/knews/

  2. creverter
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Ole!

    You can do it trough call manually the PHP function:

    <?php
    $form_code=$Knews_plugin->getForm();
    ?>

    Then, replace the email input field as hidden field with email value inside, and print the form...

    Another way is directly add the user callling Knews function:

    function add_user($email, $id_list_news, $lang='en', $lang_locale='en_US', $custom_fields=array(), $bypass_confirmation=false)

    This functions are in the main knews.php file.

    Regards,
    Carles.

  3. Ole Aggerholm
    Member
    Posted 1 year ago #

    Hi Carles,

    I am not that strong in php.
    Will above codesnip insert the e-mail value into the widget, in the e-mail field?
    Your first suggesion, i do not get where to instert this line??

    The next line, will override whatever the user has typed in the e-mail field??

  4. creverter
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Ole. Needs some PHP skills to do what you want. The way is get the code in a variable in your PHP theme file, not through the widget:

    <?php
    $form_code=$Knews_plugin->getForm();
    ?>

    Then use the str_replace() function to change the form HTML, and produce a HTML with replaced email input field by email hidden field, with the value of your subscriber and delete the label also, then print the code.

    Regards,
    Carles.

  5. Ole Aggerholm
    Member
    Posted 1 year ago #

    Found annoter plugin

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.