1 of 2
1
custom checkbox field in registration
Posted: 23 August 2007 07:40 AM   [ Ignore ]  
Grad Student
Avatar
Rank
Total Posts:  80
Joined  03-17-2006

I know you can add custom fields to the registration template, but these are just limited to text input, textarea and dropdown. I need to add a checkbox. Plus, the checkbox when checked must automatically add the registrant to the EE newsletter mailing list!

Any idea how I can do this?

Profile
 
 
Posted: 23 August 2007 09:11 AM   [ Ignore ]   [ # 1 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23538
Joined  05-20-2002

I know a check has been added for this- on your registration template, try adding in:

<p><input type='checkbox' name='mailinglist_subscribe' value='1' checked="checked"  />  <span class="alert">Subscribe to Mailinglist?</span></p>


If that doesn’t work, I’ll pop open the code and take a closer look.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 23 August 2007 09:37 AM   [ Ignore ]   [ # 2 ]  
Grad Student
Avatar
Rank
Total Posts:  80
Joined  03-17-2006

Nearly. Registration works, but registrants aren’t being added to the mailing list.

Profile
 
 
Posted: 23 August 2007 09:42 AM   [ Ignore ]   [ # 3 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23538
Joined  05-20-2002

Let’s see- it’s definitely in there.  Make sure your value is the same as the mailing list you want them subscribed to.  So in the example above?  The mailing list id is ‘1’- if yours is different, you’d need to change that.

OK- next, keep in mind it’s a little complicated because you have a lot of options on how people can register- and the mailing list is supposed to be double opt in.  So- go to ‘Admin- Utilities- MySQL Manger- Manage DB Tables’ - take a look at the exp_mailing_list_queue - are they being put in there?  That’s a holding table- they’ll be moved over to the actual mailing list upon confirmation.

And- let’s see- what are your registration settings?  Email confirmation, manual confirmation, or no confirmation/auto?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 23 August 2007 09:47 AM   [ Ignore ]   [ # 4 ]  
Grad Student
Avatar
Rank
Total Posts:  80
Joined  03-17-2006

Ho-ho! Of course. Changed the id to the correct list and now we’re in business.

Thanks Robin.

Profile
 
 
Posted: 23 August 2007 09:57 AM   [ Ignore ]   [ # 5 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23538
Joined  05-20-2002

La!  I should have mentioned it in the first place.  Glad it was an easy fix!

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 21 January 2008 11:02 AM   [ Ignore ]   [ # 6 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  11-28-2007

Robin, I tried to set up the same ability. I used the code you described above, confirmed that the value is the same as the list, and then submitted a new registration several times.

The link signing me up for a newsletter on the registration page displays correctly. I received the confirming email and activated the account. I went into the members section and saw my new account. But I was not signed up for the newsletter, and exp_mailing_list_queue did not show anything pending. Any suggestions?

 Signature 

Promise Media

Profile
 
 
Posted: 21 January 2008 11:21 AM   [ Ignore ]   [ # 7 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23538
Joined  05-20-2002

Can you sign up to it manually?  Mailing list is installed and such?  And you’re running the latest version?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 21 January 2008 11:33 AM   [ Ignore ]   [ # 8 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  11-28-2007

The email list list works correctly. I did sign up the address manually within the email module. I’m new enough to EE that I’m not sure about this next point, but in Admin / Members and Groups / View / Utilities / View Subscriptions, there is no email subscription listed.

 Signature 

Promise Media

Profile
 
 
Posted: 21 January 2008 11:34 AM   [ Ignore ]   [ # 9 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  11-28-2007

And yes, I’m running the latest version.

 Signature 

Promise Media

Profile
 
 
Posted: 21 January 2008 11:56 AM   [ Ignore ]   [ # 10 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23538
Joined  05-20-2002

Hm- go to ‘Admin- Utilities- SQL Manager- Manage DB Tables’ and browse exp_mailing_list_queue - is the one you signed up as in there?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 22 January 2008 07:41 AM   [ Ignore ]   [ # 11 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  11-28-2007

No, it’s empty.

 Signature 

Promise Media

Profile
 
 
Posted: 22 January 2008 09:18 AM   [ Ignore ]   [ # 12 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23538
Joined  05-20-2002

Puzzling.  Can you link me to your registration page?  I’d like to take a look at the rendered code.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 22 January 2008 09:34 AM   [ Ignore ]   [ # 13 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  11-28-2007

Here you go:

http://new.vpa.net/index.php/member/register/

 Signature 

Promise Media

Profile
 
 
Posted: 22 January 2008 10:06 AM   [ Ignore ]   [ # 14 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23538
Joined  05-20-2002

Looks like the value is wrong- it needs to be a number- specifically the number of the mailing list you want them assigned to.  Rendered code looks like:

<input type='checkbox' name='mailinglist_subscribe' value='epress' checked="checked"


Value should likely be ‘1’- or basically, whatever the id is for that mailing list.

Make sense?

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 22 January 2008 10:45 AM   [ Ignore ]   [ # 15 ]  
Lab Assistant
RankRank
Total Posts:  161
Joined  11-28-2007

Yes, that solved it. I assumed incorrectly I should use the short name of the list for the value rather than the number. Thank you.

 Signature 

Promise Media

Profile
 
 
Posted: 22 January 2008 11:16 AM   [ Ignore ]   [ # 16 ]  
Moderator
Avatar
RankRankRankRankRankRankRank
Total Posts:  23538
Joined  05-20-2002

wink  Easy to do- and glad it’s squared away now.

 Signature 

AKA rob1

Help Request TipsPro Network

Profile
 
 
Posted: 20 February 2008 04:03 PM   [ Ignore ]   [ # 17 ]  
Lab Assistant
RankRank
Total Posts:  242
Joined  01-06-2006

Thanks Robin. I’ve been trying to figure out this little trick for a minute. Thanks!!

Profile
 
 
Posted: 27 February 2008 09:55 AM   [ Ignore ]   [ # 18 ]  
Lab Assistant
RankRank
Total Posts:  134
Joined  08-22-2007

Hello Robin,

Is there a way to do the opposite of this…  mailinglist_unsubscribe? 

Reason:
Users subscribe to the mailing list prior to becoming a member.  Once they register I would like to remove them from the mailing list as they are added to a member group.  This will stop them from getting duplicate emails when both the list and a member group are selected.

Profile
 
 
   
1 of 2
1
 
Post Marker Legend
New Topic New posts Hot Topic Hot Topic with new posts New Poll New Poll Moved Topic Moved Topic Sticky Topic Sticky topic
Old Topic No new posts Hot Old Topic Hot Topic with no new posts Old Poll Old Poll Closed Topic Closed Topic Announcement Announcements
Theme
Change Theme
Visitor Statistics
The most visitors ever was 1149, on July 16, 2007 09:33 AM
Total Registered Members: 65026 Total Logged-in Users: 41
Total Topics: 82116 Total Anonymous Users: 18
Total Replies: 441310 Total Guests: 182
Total Posts: 523426    
Members ( View Memberlist )
Newest Members:  meenoiYang.JianuoioitsukiNathan HammondalexcigadamstaneckiLucas Mayscybermilltstitt