Support » Plugin: MailPoet Newsletters » [Plugin: Wysija Newsletters] How do I insert the form without using widget?

Viewing 15 replies - 1 through 15 (of 24 total)
  • Hi Kaled,

    We recommend our users to use widgets for ease of use.
    Nevertheless if you want to insert the form without using widget, here is the solution:

    $widgetdata=array(
        'widget_id' => 'wysija-nl-php-1', //form identifier important when many subscription forms on the same page
        'lists' => array ( 0 => '4', ), //array of list_id to which you want to subscribe your users
        'submit' => 'Subscribe!', //name of the subscribe button
        'success' => 'You\'ve successfully subscribed. Check your inbox now to confirm your subscription.'//success message returned when registered
            );
    
    $widgetNL=new WYSIJA_NL_Widget(1);
    $subscriptionForm= $widgetNL->widget($widgetdata,$widgetdata); 
    
    echo $subscriptionForm;

    That should do the trick 🙂
    Let me know!

    Cheers,

    Ben

    Niiiiiiiice !!

    It worked. Very good!

    Muito obrigado !! =D

    hehe cool 🙂

    Seja bem-vindo !

    Sorry but… Is the first time that i use WP! And sorry for my english… Where i must copy this code? I have a website made with a free template. I want put this plugin inside a page called Newsletter, i have copy this code inside a form, but it doesn’t work, i see only the text:

    $widgetdata=array(
    ‘widget_id’ => ‘wysija-nl-php-1’, //form identifier important when many subscription forms on the same page

    Etc… Etc…
    Thanks
    D.

    We have very simple and automated ways to do things in Wysija.
    Coding is not necessary !

    If you want to add the subscription form in a page or post. Please do not use this php code.

    Instead, from the text editor of your page/post follow the tutorial here:
    http://support.wysija.com/knowledgebase/add-a-subscription-form-to-an-article-or-page/.

    Cheers,

    Ben

    Thanks! now it works! but i have a problem… first i insert the form inside my page, then i put my email address, but when i click on “subscribe” doesn’t appear the message “You’ve successfully subscribed…..” but only this code: “YTo0OntzOjk6IndpZGdldF9pZCI7czoyMDoid3lzaWphLW5sLTEz etc….”

    bye bye

    Strange !

    I don’t have the same problem on my end.
    Can you come to our support site to post a ticket so that we can solve that bug together?

    http://support.wysija.com

    Thanks

    Ben

    i don’t know, because if i look the html code of the page, i see this: (that is the form)

     
    [Code moderated as per the Forum Rules. Please use the pastebin]
     

    the problem is when i click on subscribe that appear only “YTo0OntzOjk6IndpZGdldF9pZCI7czoyMDoid3……”

    I tried to replace this code “YTo0OntzOjk6IndpZGdldF9pZCI7czoyMDoid3……” with this text: “Thanks, now check your email…”

    but when i connect to the page , i see up to the form this code:
    Warning: extract() [function.extract]: First argument should be an array in /htdocs/public/www/wp-content/plugins/wysija-newsletters/core/base.php on line 2

    Thanks for everythings

    Yes you cannot modify that code, this is meant not to be touched 🙂
    It is a base64 encoded string of a serialized array.
    It contains the data describing the subscription form.

    My guess is that there is a javascript conflict on your site.
    Can you give me the address of your site so that I can have a look?

    Ben

    yes… but can i send you the website in a private address? not so public…

    yes sure ! come to our support website and let’s finish our conversation there 🙂

    http://support.wysija.com

    from haleinad:

    Ben, thanks! I’ve found the problem 🙂 (read on your website…) There was a conflit with different plug-in!
    Have a nice day!

    I hope she will tell us which plugins is entering in conflict with us.
    🙂

    By the way we have just committed a change that might solve a lot of conflicts with other plugins.
    Actually we removed a line which was intended to suppress a conflict with a particular plugin. This precise line was creating even more conflict with other plugins :/

    I realised that a lot of plugins tend to include their own javascript on backend pages where they don’t belong. For instance wysija’s interfaces 😡

    I hope we could change this bad habit, but it sounds like a fight we cannot win 🙁

    Hello,
    I’ve got the same probleme with the new “newsletter” page I just created with your form inside. A token is displayed when sending an e-mail to subscribe.
    The site is private so I can’t give you the url, but I can see that the following plugin javascripts are on that page : contact form 7, and wp-postratings.
    Thanks in advance for help

    Ben

    (@benheu)

    Hi Oelita,

    I’m not sure I understand the issue that there is with your site.
    I’ve tried the latest version of contact form 7 and wp-postratings with wysija and our visual editor works fine with it.

    Anyway come to http://support.wysija.com and post a support ticket we will be able to exchange private information from there.

    See you there!

    Cheers,
    Ben

    There is no probleme with the visual editor, only with the form you generate in my page, to subscribe.

    I quote the former message from haleinad :

    “first i insert the form inside my page, then i put my email address, but when i click on “subscribe” doesn’t appear the message “You’ve successfully subscribed…..” but only this code: “YTo0OntzOjk6IndpZGdldF9pZCI7czoyMDoid3lzaWphLW5sLTEz etc….”

    I have the same problem. And as the solution was “conflict with different plug-in!”, I’m looking for that.

    I’m creating a support ticket, anyway 🙂

Viewing 15 replies - 1 through 15 (of 24 total)
  • The topic ‘[Plugin: Wysija Newsletters] How do I insert the form without using widget?’ is closed to new replies.