Skip to Content Skip to Menu

🌲 Merry Christmas! Great savings on Professional and Developer Memberships! Get 25% off now with code XMAS-2024!

[SOLVED] Default value for a single checkbox

6 years 4 months ago - 6 years 4 months ago #306514 by haraldundandrea
[SOLVED] Default value for a single checkbox was created by haraldundandrea
Hello,

is it possible to set a default value for a single checkbox too?

I just found descriptions for multiple checkboxes.

I tried it with the name of the checkbox und with the output that is displayed in the profile, but both did not work, the checkbox stays always unchecked.

Greetings - Harald
Last edit: 6 years 4 months ago by krileon. Reason: Added [SOLVED] tag to subject

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

  • krileon
  • krileon
  • ONLINE
  • Posts: 48622
  • Thanks: 8303
  • Karma: 1446
6 years 4 months ago #306534 by krileon
Replied by krileon on topic Default value for a single checkbox
The default values for fields only apply to registration. With that in mind yes you can set a default value by using 1 (checked) or 0 (unchecked). For multicheckbox set the default to whatever value you want default based off the options you've added to it (for multiple values separate them with |*|).


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 4 months ago #306557 by haraldundandrea
Replied by haraldundandrea on topic Default value for a single checkbox
I think I tried this too to use 1 for the checkbox to be checked but I did not work.

I will test it again soon.

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

6 years 4 months ago - 6 years 4 months ago #306561 by haraldundandrea
Replied by haraldundandrea on topic Default value for a single checkbox

krileon wrote: you can set a default value by using 1 (checked) or 0 (unchecked).


This time it works, do not know what I made wrong first time I tried. ;)

Never the less it helps to know what values have to be used! :)
Last edit: 6 years 4 months ago by haraldundandrea.
The following user(s) said Thank You: krileon

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

Moderators: beatnantkrileon
Powered by Kunena Forum