[html-formfu] Problem with rendering Label type on invalid
submission
Rippl, Steve
rippls at woodlandschools.org
Fri Feb 4 03:19:58 GMT 2011
On Thu, Feb 3, 2011 at 3:20 PM, Carl Franks <fireartist at gmail.com> wrote:
> Hi Steve,
>
> I'm afraid I haven't had a chance to try running any code for this,
> but I suspect the problem is because the Label element doesn't have a
> "name" defined.
> Although the name isn't used anywhere in the output xhtml, the Label
> element is still a Field element internally, and so must have a name.
>
> Carl
>
Thanks for the response Carl, but I don't think that's doing it! I
changed the Multi and Labels to
- type: Fieldset
elements:
- type: Multi
name: jointcustody-multi
elements:
- type: Label
tag: span
name: jointcustody-label
value: "IS THERE A JOINT-CUSTODY OR WASHINGTON STATE
PARENTING PLAN IN EFFECT?"
container_tag: span
- type: Radio
name: jointcustody
label: yes
value: yes
container_tag: span
reverse_multi: 1
- type: Radio
name: jointcustody
label: no
value: no
container_tag: span
reverse_multi: 1
- type: Label
value: " (If yes, Washington State Parenting Plan must be
on file with the school for enforcement.) "
name: jointcustody-label2
and still the Labels don't get rendered if other fields in the form
fail a constraint. Here's the actual output...
<fieldset>
<div class="multi">
<span class="elements">
<span name="jointcustody-multi.jointcustody-label"></span>
<input name="jointcustody-multi.jointcustody" type="radio" value="yes" />
<label>yes</label>
<input name="jointcustody-multi.jointcustody" type="radio" value="no" />
<label>no</label>
<span name="jointcustody-multi.jointcustody-label2"></span>
</span>
the <span></span> tags for the Labels are there in the output even if
I don't include the name attribute, they just don't have a name in
that case, but as you can see in either case the tags are empty.
Thanks for your time!
Steve
--
Steve Rippl
Technology Director
Woodland Public Schools
360 841 2730
More information about the HTML-FormFu
mailing list