[SOLVED] Language dependent "Pre-filled default value at registration"

10 years 2 months ago - 10 years 2 months ago #241099 by MacPhotoBiker
Hi,

I'm offering a pull down menu to select the preferred language for future correspondence. In English, it offers "English, French", and in French it offers "Anglais, Français", that's ok.

I'd like to set the default value depending on the fact if the user is currently using the English page, or the French page.

In other words, if the user is using the English registration process, default should be English, if he's using the French process, default should be Français.

I tried to set up a variable called _CORR_DEFAULT



but it does not change the default value, always the first value in the list is shown.
Am I missing something, or can this not be done?

Thanks!
Attachments:

Please Log in to join the conversation.

10 years 2 months ago - 10 years 2 months ago #241101 by MacPhotoBiker

Please Log in to join the conversation.

10 years 2 months ago #241103 by krileon
What field type is your field exactly? Single select, multi-select, etc.. so I can re-test the feature.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

10 years 2 months ago #241104 by MacPhotoBiker
It's a Drop Down (Single Select)

Please Log in to join the conversation.

10 years 2 months ago #241111 by krileon
Seams to be working ok in my tests. Are you conditioning the field with CB Conditional or CBSubs? As either of those could be causing the value to clear. It also only works on registration and will not work in profile edit so be sure you're testing frontend registration.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in to join the conversation.

10 years 2 months ago #241117 by MacPhotoBiker
I'm not working on CBSubs at all so far (although it's installed).

This is a screenshot of my field editor:




Value settings:



Settings in French language.php:
// Values for cb_correspondence
DEFINE('_ENGLISH','Anglais');
DEFINE('_FRENCH','Français');
DEFINE('_CORR_DEFAULT','Français');

Settings in English language.php:
// Values for cb_correspondence
DEFINE('_ENGLISH','English');
DEFINE('_FRENCH','French');
DEFINE('_CORR_DEFAULT','English');

To check on Frontend, please try

199.101.48.170/~afammaiw

No matter which language is selected, default for "Correspondence" is always French/ Francais.

I'm not using any "Condition", as this was not necessary for all other language strings. Am I missing something?
Attachments:

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.823 seconds

Facebook Twitter LinkedIn