I realize the new custom field I defined does not have any value set for a Yes/No field, but it's really a basic expectation that I should have Yes or No set by default.
It doesn't work in the backend field setting to say an empty field is the default. I can code for the field being empty or zero for the default but is there an *xml file I can edit or JavaScript I can add to a templates file, just to show the default "Yes" is selected in Profile Edit? An autoaction triggered by Profile Edit seems excessive.
Update: I decided I could accomplish what I wanted with a single checkbox, so nevermind. I'll just leave this up in case any one else is interested.
Last edit: 3 months 1 week ago by kdave321. Reason: Updated
Technically you can just change the database column default to 1 or 0 if you wanted. The reason 0, 1, and NULL are supported is they're all 3 different states. 0 is explicitly No, 1 is explicitly Yes, and NULL is the user never saved the field. We do allow supplying a default, but only if the field is available during registration. Technically it doesn't need to be visible on registration as you can hide it with CSS. We're avoiding major changes to fields right now because we'll be moving entirely to Joomla fields sometime in CB 3.0 (this will be a feature switch so don't worry!).
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.