Hi All,
I am in the process of getting some Woody forms approved as WAI compliant.
http://www.w3.org/WAI/
While WAI may not be everybody's cup of tea ..... in certain sectors it is a common requirement .... and it is certainly not a bad selling point.
There are three issues which come up regularly with basic Woody forms:
1) Provide an explicit label for each form control. (Level 2)
2) Include default, place-holding characters in edit boxes and text areas. (Level 3)
3) Provide a summary for tables. (Level 3)
<snip>
Issue (2), placeholder text, is slightly more complicated. I think we would have to introduce the concept of a default value to Woody's field markup, with the *option* to automatically invalidate fields which had their default values in.This would be nice, I know there's a lot of work left to go on the client-side aspect of Woody/CForms.
As far as setting default values in a form, you can do something like this in your flow:
bean = new Packages.foo.myBean();
bean.setBlah("default value");
form.load(bean);
form.showForm("whatever");It would be nice to be able to set a default value for a field however.
Furthermore, I suspect it would be best if such fields had JavaScript like the following in them, when they have been populated with a default value that is not allowed by the validation:
<input name="sample-field" value="default value" onfocus="if (this.value == 'default value') this.value = '';" onblur="if (this.value == '') this.value = 'default value';" etc. />
Issue (3) making sure tables have summaries is easy:
<table summary="this is a summary of the table's contents">
Several widgets in Woody make Tables, I propose that their 'hint' could be used as the summary.
+1 for the hint going into the table summary.
Tony
