latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Profile Field – Select Menu With No Selection

Home Forums Community Forum Profile Field – Select Menu With No Selection

This topic contains 5 replies, has 2 voices. Last updated by  Cristián Lávaque 4 years, 6 months ago.

Topic Author Topic
Posted: Monday Jun 18th, 2012 at 6:33 pm #16795

I created a custom profile field for “Country Code” in S2Member Pro.

So, my file is pretty typical with entries like:

CN|CHINA
UK|ENGLAND
US|UNITED STATES
…..
…..

My Question: I want the default to be “Not Selected” (blank), so that when I make it a required field, that forces the user to actually select something. Otherwise, it’s too easy for the user to miss it (if there’s no way to default to a blank selection, then there’s always something “selected”). Please advise.

J

List Of Topic Replies

Viewing 5 replies - 1 through 5 (of 5 total)
Author Replies
Author Replies
Posted: Tuesday Jun 19th, 2012 at 6:32 am #16866

Hi Tuhin.

At the top of your list add:

[hilite code]||default[/hilite]

I hope that helps. :)

Posted: Tuesday Jun 19th, 2012 at 9:49 am #16900

Awesome. Thanks. That works.

Is there a way to add an entry to the select menu that is not selectable?

For example, I might want a country menu that has the most common entries on top with a divider, e.g.

CN|CHINA
IN|INDIA
US|UNITED STATES
——|——- <<< can I make this not selectable?
AX|ALAND ISLANDS
AL|ALBANIA
AS|AMERICAN SAMOA
AD|ANDORRA
AI|ANGUILLA
….
….

Posted: Tuesday Jun 19th, 2012 at 6:58 pm #16936

Try this:

[hilite code]|-------------[/hilite]

Even if it can be selected, since it has an empty value, it won’t be accepted when submitted.

Posted: Tuesday Jun 19th, 2012 at 8:42 pm #16949

Yup. That works. Thanks.

Posted: Wednesday Jun 20th, 2012 at 7:42 am #16999

Cool. :)

Viewing 5 replies - 1 through 5 (of 5 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.