Home › Forums › Newsletter Plugin Support › Set preference automatically with form
Yesterday we bought the newsletter plugin. Im trying to set a preference (which I made before in the admin interface) with a custom form.
An account is being created, so everything seems to work, except that the preference is not set.
It’s a Gravity form. With Gravity, you can pass on data after the form is sent, because initially the form is used for something else.
I set up the following:
$body = array(
‘nn’ => rgar( $entry, ‘2’ ),
‘ns’ => rgar( $entry, ‘3’ ),
‘ne’ => rgar( $entry, ‘4’ ),
‘nl’ => rgar( $entry, ‘5’ ),
$request = new WP_Http();
$response = $request->post( $post_url, array( ‘body’ => $body ) );
Is this the correct way to set a preference, via “nl”? Or “nl”?
Strange thing is, I tried both, but none of them are working.
Thank you in advance.
nl is correct, bu is the preference signed as “even on subscription” in the preference panel?
Thanks for the reply.
No, it’s set as “disabled/private use”. Does it need to be set as “even on subscription”? I would like to have it appear only on the preferences panel in WP, not for users to see.
Leaving them as private it means you want to manually set them without the ability by users to set/unset them. Try to set them as “available on profile form” so they are not shown on subscription form by they are still public.
Terms and Conditions
Sign up for latest news, important updates and special tutorials.
© 2022 Web Agile S.a.s. di Fietta Roberto - VAT IT-03809490240