Skip to Content Skip to Menu

Eliminate "Default" as a choice in User Parameter language selection

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
6 years 10 months ago #300215 by boyjahq
I have User Parameters as a required item at registration and have blocked all items except language. However, even if they choose nothing the item is set to "Default" so the required validation is useless. How can I eliminate the "Default" option and force them to choose a specific language (make it required that they choose one)? There is no way for the user to know what is the default language of the site...

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 10 months ago #300222 by krileon
It's output entirely by Joomla. Unless Joomla has an option to disable the Default option you won't be able to remove that.


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 or Create an account to join the conversation.

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
6 years 10 months ago #300251 by boyjahq
Is it possible to create a CB field for use at registration where the user chooses their preferred language and that value is saved in the database AS WELL as having it automatically set the Joomla Language User Parameter? I know I can create the field and have it saved in the DB but the part I'm not sure about is how to sync the choice made with the system language parameter.

Please Log in or Create an account to join the conversation.

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
6 years 10 months ago #300263 by boyjahq
I decided that I want to be able to access and see user selected site language throughout CB so I created a registration radio button field cb_sitelanguage with 2 choices:

Value = en-GB Label = English
Value = ja-JP Label = 日本語

How can I have this information update the Joomla user parameter for site language when submitting registration? Is that an Autoaction? If so, what type of action?

When I inspect the element for user parameter language selection on the registration page I see the following:

<div class="sectiontableentry1 cbft_param cbtt_select form-group cb_form_line clearfix" id="cbfr_userparam_2"><label for="params[language]" id="cblabparams[language]" class="control-label col-sm-3">Frontend Language</label><div class="cb_field col-sm-9"><div id="cbfv_userparam_2"><select class="form-control" id="params_language" name="params[language]">
<option value="" selected="selected">- Use Default -</option>
<option value="en-GB">English (United Kingdom)</option>
<option value="ja-JP">日本語 (Japan)</option>
</select>
<span class="cbFieldIcons"> <span class="cbTooltip" data-cbtooltip-tooltip="This Field is required" data-hasqtip="14"><span class="fa fa-star text-muted"></span></span></span></div></div></div>

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 10 months ago #300286 by krileon
CB Auto Actions doesn't have a usage for storing Joomla user parameters. You'd have to completely code that your self using the Code action and PHP.


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 or Create an account to join the conversation.

  • boyjahq
  • boyjahq
  • OFFLINE
  • Posts: 473
  • Thanks: 33
  • Karma: 3
6 years 10 months ago #300431 by boyjahq
In "CB Core: Edit Field [User Parameters]" there is an option for specifying the "Default Registration Value". When I set that to ja-JP (one of the values shown when I inspect the element on the frontend--see previous reply for details), it does not change the value on registration. It still shows as "Default". Is there something else I must do to set the Default Registration Value showing for registration? Some different syntax?

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum