PriMoThemes — now s2Member® (official notice)

This is now a very OLD forum system. It's in READ-ONLY mode.
All community interaction now occurs at WP Sharks™. See: new forums @ WP Sharks™

Requiring a State/Province only if US or Canada

s2Member Plugin. A Membership plugin for WordPress®.

Requiring a State/Province only if US or Canada

Postby philipt18 » January 9th, 2012, 9:51 am

Is there a way to require a state/province in the custom reg fields only if US or Canada are selected in the country listing (which I have set up as a menu)? Thanks.
User avatar
philipt18
Experienced User
Experienced User
 
Posts: 50
Joined: December 1, 2011

Re: Requiring a State/Province only if US or Canada

Postby Eduan » January 9th, 2012, 9:26 pm

Please try this post and tell me if it helps:
viewtopic.php?f=4&t=15715

The idea is to collect, when they register, the fields and use things similar to what's on this video:
http://www.s2member.com/custom-fields-d ... lly-video/

Hope this helps. :)
Also remember to report back,
otherwise you leave me worrying. ;)
Now officially accepting Professional s2Member installations along with Bruce C (a.k.a. Ace).

If you're interested in a Professional s2Member Installation, or a Custom Coding Job, you can send your request here.
User avatar
Eduan
Experienced User
Experienced User
 
Posts: 1154
Joined: August 27, 2011
Location: Taxco de Alarcón, Guerrero, México.

Re: Requiring a State/Province only if US or Canada

Postby philipt18 » January 10th, 2012, 3:15 am

The first topic seems to be discussing using shortcodes to determine a user's settings after they've registered, but I need a conditional while they're registering.

The second series of videos is interesting, although it seems to make changes before the registration page is loaded, and thus doesn't affect my issue of wanting to dynamically change the registration page based on the user selection.

For example, if the user selects either United States or Canada, then the State/Province drop-down would populate with States and Provinces (or better yet if the US is selected it fills with US States and if Canada is selected it fills with Canadian Provinces).

Basically, my goal is to eliminate incorrect information in the database. Right now I have a required city field, a non-required state/province field (since most countries don't need this), and a required country field. The problem is that some people who should be filling in the state/province field are not doing so since it is not required. Also, since there is no verification for States/Provinces, I am getting a mish-mash of formats (two-letter codes, written out, etc.).

What I want is that State/Province be a required field, but only settable if the user already selected US or Canada as their country.
User avatar
philipt18
Experienced User
Experienced User
 
Posts: 50
Joined: December 1, 2011

Re: Requiring a State/Province only if US or Canada

Postby Cristián Lávaque » January 12th, 2012, 5:52 am

Yes, I know what you want to do. I'm afraid that custom fields don't work between them dynamically based on the data entered. :|
Cristián Lávaque http://s2member.net
Is s2Member working for you? Please rate it Image at WordPress.org. Thanks! :)
User avatar
Cristián Lávaque
Developer
Developer
 
Posts: 6836
Joined: December 22, 2010


Return to s2Member Plugin

Who is online

Users browsing this forum: Google [Bot] and 9 guests

cron