At the moment I don´t think this is possible, to set a default value out of the box with the built in true/false, there is no configuration options on it.
The solution right now as I see it, is to make the name of the field, so when it´s false the do the comon thing that you want.
As I see it, it could be nice to have some configurations options on the true false data type, like set a default value. Therefor I have made a feature request for that:
Setting True/False Value as Default
Hi All,
Working on an Umbraco 6 Project.
Is there a way to set the default value of a true/false data type to true?
Kind regards,
J
Sure, just use the ApplicationEventHandler to subscribe to the ContentService Saving event, check if the IContent is new and set the property to "1", which equals true for the true/false datatype.
Hi James,
At the moment I don´t think this is possible, to set a default value out of the box with the built in true/false, there is no configuration options on it.
The solution right now as I see it, is to make the name of the field, so when it´s false the do the comon thing that you want.
Hope this helps, and make sense.
/Dennis
Hi James and Stefan,
As I see it, it could be nice to have some configurations options on the true false data type, like set a default value. Therefor I have made a feature request for that:
You can find the feature request here: http://issues.umbraco.org/issue/U4-5787
/Dennis
is working on a reply...