Skip to Content Skip to Menu

[SOLVED] cannot get check-box checked by default

6 years 6 months ago #304003 by jeroen aalders
Replied by jeroen aalders on topic cannot get check-box checked by default
I did do that first but then I didn't get them to be checked, I guess the value should still be ' 1 ' with multiple checkboxes?

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 6 months ago #304022 by krileon
Replied by krileon on topic cannot get check-box checked by default
For a multicheckbox field with a single option yes set the value to 1 then supply whatever label you want. To be checked by default at registration you should just have to set the default registration value to 1.


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.

6 years 6 months ago #304060 by jeroen aalders
Replied by jeroen aalders on topic cannot get check-box checked by default
"For a multicheckbox field with a single option yes set the value to 1 then supply whatever label you want. To be checked by default at registration you should just have to set the default registration value to 1. "
- That's just it, the fields aren't on the registration and when I switch to multiple it doesn't set checked by default...
Been struggling to get this right for quite some time now and hope you can help me out here!

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 6 months ago #304071 by krileon
Replied by krileon on topic cannot get check-box checked by default
There is no parameter to set a fields default value outside of registration. If it doesn't display on registration the registration default value will not work. You would need to strictly check if a fields value is null before attempting to apply some sort of default value behavior to profile edit, which CB Auto Actions can't condition against since its conditions are not strict and it can not check for null.


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.

6 years 5 months ago #304134 by jeroen aalders
Replied by jeroen aalders on topic cannot get check-box checked by default
"You would need to strictly check if a fields value is null before attempting to apply some sort of default value behavior to profile edit, which CB Auto Actions can't condition against since its conditions are not strict and it can not check for null. "
- Maybe it is me who doesn't understand but so far, you've been feeding me hints but we haven't got a working solution and so, after having this conversation run back and forth to get a check box checked from the start, it seems, we are back where we started?
How do I check a checkbox upon registration in CB? IMHO this should not be such a complicated functionality, right?
Could you please help by telling me what settings I have to change or add so that the check box (single or multiple) is checked by default rather than unchecked. I would like to move on and apply your solution asap and continue the development.

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48444
  • Thanks: 8279
  • Karma: 1443
6 years 5 months ago #304149 by krileon
Replied by krileon on topic cannot get check-box checked by default

How do I check a checkbox upon registration in CB? IMHO this should not be such a complicated functionality, right?

If the field is set to display on the registration page then set "Default Registration Value" to 1. If it is not displayed on registration then use the below CB Auto Action.

Global
Triggers: onAfterUserRegistration
Type: Field
User: Automatic
Access: Everybody
Action
Field: YOUR_FIELD_HERE
Operator: Set
Value: 1

None of this will apply to existing users. Those you must fix manually. There is no means of setting a default value for a field for existing users.


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.

Moderators: beatnantkrileon
Powered by Kunena Forum