Add support for default values without the need of an instance element
Add support for default values without the need of an instance element
When you created a form using an implicit instance and want to add a default values for a form control you need to add the complete instance (structure and the default values for all controls) in XForms 1.1. Adding support for default values without requiring to add the whole instance will smoothen the transition path from a simple form to a more advanced form. Especially in combination with the other features that enable easier form creation.
Proposal on the telecon for the attribute name are : initial, default, initial-value, default-value
Proposed spec changes
- We will add initial-value to the attribute set UI Common
- initialize
Pending questions
- Does the initial value gets reinforced when the user sets the value of the control to the empty string?
- No
- Does the initial value only gets applied if the initial text content of the bound node is empty?
- yes?
- Does the initial value gets applied when a control is created due to the insertion of a node and its text content is empty?
- yes, we have a a separate instance with a prototype that will contain the default value (telecon 2008-06-25, http://www.w3.org/2008/06/25-forms-irc#T15-50-05)
- Does the initial value gets reinforced when the node to which the control was bound changes and the text content of the new node is empty?
- No (telecon 2008-06-25, http://www.w3.org/2008/06/25-forms-irc#T15-50-05)
http://lists.w3.org/Archives/Public/public-forms/2008Mar/0097.html