FAQ
Hi,

I have some largish forms which include Multi elements like the
following, composed of Labels and Radios. If another element on the
form has a constraint that fails, and the form is re-rendered with the
appropriate error messages, then none of the Label types appear, I'm
left with radios buttons (with their labels with a small l), but the
Lables (big L) don't show up.


- type: Fieldset
elements:
- type: Multi
elements:
- type: Label
tag: span
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.) "


So is the Label type not being called on a failed constraint? How can I check?

Thanks,
Steve


--
Steve Rippl
Technology Director
Woodland Public Schools
360 841 2730

Search Discussions

  • Carl Franks at Feb 3, 2011 at 11:20 pm

    On 3 February 2011 04:51, Rippl, Steve wrote:
    Hi,

    I have some largish forms which include Multi elements like the
    following, composed of Labels and Radios. ?If another element on the
    form has a constraint that fails, and the form is re-rendered with the
    appropriate error messages, then none of the Label types appear, I'm
    left with radios buttons (with their labels with a small l), but the
    Lables (big L) don't show up.
    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
  • Rippl, Steve at Feb 4, 2011 at 3:19 am

    On Thu, Feb 3, 2011 at 3:20 PM, Carl Franks 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
  • Rippl, Steve at Apr 4, 2011 at 10:14 pm

    On Thu, Feb 3, 2011 at 7:19 PM, Rippl, Steve wrote:
    Hi,

    I have some largish forms which include Multi elements like the
    following, composed of Labels and Radios. If another element on the
    form has a constraint that fails, and the form is re-rendered with the
    appropriate error messages, then none of the Label types appear, I'm
    left with radios buttons (with their labels with a small l), but the
    Lables (big L) don't show up.
    On Thu, Feb 3, 2011 at 3:20 PM, Carl Franks 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.


    This is still a problem for me under 0.09002, I'd dig around in the
    code but I don't really know where to begin?

    Any pointers would be appreciated...

    Thanks,
    Steve


    --
    Steve Rippl
    Technology Director
    Woodland Public Schools
    360 841 2730
  • Charlie Garrison at Apr 4, 2011 at 11:06 pm
    Good morning,

    On 4/04/11 at 3:14 PM -0700, Rippl, Steve
    wrote:
    This is still a problem for me under 0.09002, I'd dig around in the
    code but I don't really know where to begin?

    Any pointers would be appreciated...
    Add a 'hidden' field with the same value and name. The hidden
    field will retain the value for the subsequent request.


    Charlie

    --
    ? Charlie Garrison ? <garrison@zeta.org.au>

    O< ascii ribbon campaign - stop html mail - www.asciiribbon.org
    ? http://www.ietf.org/rfc/rfc1855.txt
  • Rippl, Steve at Apr 5, 2011 at 12:03 am

    On Mon, Apr 4, 2011 at 4:06 PM, Charlie Garrison wrote:
    Good morning,


    On 4/04/11 at 3:14 PM -0700, Rippl, Steve wrote:

    This is still a problem for me under 0.09002, I'd dig around in the
    code but I don't really know where to begin?

    Any pointers would be appreciated...
    Add a 'hidden' field with the same value and name. The hidden field will
    retain the value for the subsequent request.


    Charlie

    --
    Well, bit of a crude hack but it works!

    Thanks! :-)

    Steve

    --
    Steve Rippl
    Technology Director
    Woodland Public Schools
    360 841 2730
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/html-formfu/attachments/20110404/dd12ca88/attachment.htm

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
grouphtml-formfu @
categoriesperl, catalyst
postedFeb 3, '11 at 4:51a
activeApr 5, '11 at 12:03a
posts6
users3
websitemetacpan.org...

People

Translate

site design / logo © 2022 Grokbase