[ http://issues.apache.org/jira/browse/COCOON-1951?page=all ]

Mark Lundquist updated COCOON-1951:
-----------------------------------

    Attachment: 1951.patch

This patch implements the enhancement essentially as described.  The new 
element is
<fd:message-label>.

> Widget label text for validation error message should be separately 
> configurable in form definition
> ---------------------------------------------------------------------------------------------------
>
>                 Key: COCOON-1951
>                 URL: http://issues.apache.org/jira/browse/COCOON-1951
>             Project: Cocoon
>          Issue Type: Improvement
>          Components: Blocks: Forms
>    Affects Versions: 2.2-dev (Current SVN), 2.1.10-dev (current SVN)
>            Reporter: Mark Lundquist
>            Priority: Minor
>         Attachments: 1951.patch
>
>
> The <fd:widget/label> element drives the display of a widget label in the 
> rendering of a form.  The CForms error messages (validation or missing 
> required field) also use the <label> element, but what makes sense in the 
> context of displaying the form fields doesn't *necessarily* make sense in the 
> context of the error message.
> In my current case, I have widgets with ids "fromName", "fromEmail", 
> "toName", and "toEmail".  These widgets actually have the following labels, 
> respectively: "Name", "Email", "Name", "Email". That works because in my 
> template, I have two HTML <fieldset>s with <legend>s "From" and "To", which 
> contain <fi:group>s containing the respective widgets.  If these requred 
> fields are missing, the error message says "Email: missing required field" 
> (or whatever); I would rather it said "Recipient email address: ..." or 
> something like that, instead.
> Another scenario would be a CAPTCHA validator.  These are often labeled with 
> something like "Type in the security code displayed to the right".  In an 
> error message, it would be better to say "Security code" or something like 
> that.
> Suggestion: a new element <fd:error-label> as a child of <fd:widget> that (if 
> present) overrides <fd:label> in error messages.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to