I am trying to have a default checked checkbox on a component dialog when editing. Here are the properties on the field:
jcr:primaryType: widget
checked: true (boolean) *Documentation says this determines default checked status
type: checkbox (string) *read this as a fix to making checkbox selections stick
xtype: selection (string)
name: ./foo (string)
fieldValue: true (string)
Yes, it looks like the documentation is a little wonky. I did some experimenting, and this combination of properties works for me:
defaultValue (String) true
fieldLabel (String) Foo Mode
inputValue (String) false
jcr:primaryType (Name) cq:Widget
name (String) ./foomode
type (String) checkbox
xtype (String) selection
The defaultValue property appears to be the key.
You do have cq:Widget for your primary type, not widget, do you not?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With