Inline
Adrian Crum wrote:
--- On Fri, 4/23/10, Robert Morley <[email protected]> wrote:
+1 - I think properly modeling the
field using the required-field attribute makes perfect
sense. I would think our html form renderer
implementation should probably just apply a class "required"
at render time and the visual should be handled by css.
I believe I was the one who introduced the required CSS class and that was my
reasoning - have the style sheet determine what a required field looks like.
At the time, the asterisk was being used to indicate a required field. The
problem was, most forms didn't have an explanation as to what the asterisk
meant. So the result looked odd.
Asterix is used to indicate required fields, and it is pretty common
practice http://simplyaccessible.org/examples/required-form-fields
No "best practice" was discussed or decided upon. I just put the new CSS class
in the style sheet and I left it to the community to decide by using it or not.
It seems community is still not agreed on what to use, and the result is
a mess
I like the idea of service definitions driving the required fields.
When a form is based on a service definition (auto-fields-service) not
optional fields are marked as required. My intention is not to change or
extend this behavior. It is already working correct. My intention is to
cleanup other forms which have manually set required indicators.
Sure, that would be nice. However, what happens when service A calls
service B, and service C sometimes dependening on the situation. How
would you chain the validations, so that no processing code was run in
A until both B and C were satisified that the data was correct?
This thread is only about:
1. Cleaning up the forms: remove the "required" label
(tooltip="${uiLabelMap.CommonRequired}") and css style
(widget-style="required") and add in their place required-field="true"
2. Change macro renderer so that if a field is required it is indicated
by asterix (as it is right now) plus a css style (the same as
widget-style="required")
Are there any objections to this?
Bilgin
-Adrian
On Apr 23, 2010, at 2:35 PM, Bilgin Ibryam wrote:
Here is what I propose:
Remove all the ${uiLabelMap.CommonRequired} tooltips
from form definitions. The tooltip should be used to provide
other information as it is for not required fields (the
purpose of the field, the format)
Remove all the widget-style="required" from form
definitions.
If a field is required, (on form widget) set only its
attribute required-field="true". In cases when the form is
based on service definition (auto-fields-service) it is not
neccessary to set this attribute. Then no need to add
tooltip="${uiLabelMap.CommonRequired} or
widget-style="required" attibutes on the form definition.
The renderer should decide how to indicate the required
field.
Change form renderer, so if a field is required it is
indicated by asterix plus required style ( same as
widget-style="required")