adding groups checkbox to custom form and user sync
-
I’ve the following checkbox in my custom form to add the groups selection which works fine.
<input type="hidden" name="mc4wp-subscribe" value="1" /> <div><input name="mc4wp-GROUPINGS[9][]" type="checkbox" value="25" checked> <label>Daily E-Newsletter (Sent 5 times per week)</span></label></div> <div><input name="mc4wp-GROUPINGS[9][]" type="checkbox" value="29" checked> <label>Weekly Top Eight E-Newsletter (Sent once a week)</label></div> <div><input name="mc4wp-GROUPINGS[9][]" type="checkbox" value="33" checked> <label>Monthly Tech Buzz E-Newsletter (Sent once a month)</label></div>
Then I also set up user sync with the following in the functions.php
$grouping_1 = array( 'id' => '9', 'groups' => array( 'Daily E-Newsletter (Sent 5 times per week)', 'Weekly Top Eight E-Newsletter (Sent once a week)', 'Monthly Tech Buzz E-Newsletter (Sent once a month)' ) ); $data['GROUPINGS'] = array( $grouping_1 );
The problem is user sync will make the user subscribe to all groups instead of the selection they made in the custom form. If I don’t add the $data[‘GROUPINGS’] code in the functions.php, user sync will make the user subscribe to no groups at all.
How do I make user sync obey the group selection people make in the custom form?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘adding groups checkbox to custom form and user sync’ is closed to new replies.