prestoav Posted 4 hours ago Share Posted 4 hours ago Hi folks, Is there any way to setup a checkbox field so that is checked by default? I can't see that in the field admin and where. Thanks! Link to comment Share on other sites More sharing options...
bernhard Posted 1 hour ago Share Posted 1 hour ago The problem with default yes is that it would not affect already existing items. So if you had 100 pages already, then you add a checkbox with default=1 and you add another 200 pages and then you use a selector "mycheckbox=1" then it would find 100 pages, not 200. Or you'd have to update all 100 pages that already existed before you added the checkbox. Ryan recommended once (if I remember correctly) to use what I'd call the reverse-label-pattern. So instead of showing a checkbox "send email after save" that is default on, you'd add a checkbox that is default off and shows "do NOT send an email after save". Or "no mail after send" or whatever. Or you add a hook on page create that populates the checkbox for you. Or you add a toggle field, that has the option to set default yes/no etc. I think I'd probably use a nice, non-reversed label together with a hook to auto-populate when the page is created. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now