Re: 3.0b3 - label[for] input[id] discrepancies

2014-12-03 Thread Joe T.
Oops. Yes, i goofed. i'm looking right at it in the docs. . Well, here's what i did... i created an extension FormHelper class, adding a public domId function that returns the protected _domId value. Checkbox isn't generating a wrapping label, nor a DOM-valid ID, so i'm providing the field's

Re: 3.0b3 - label[for] input[id] discrepancies

2014-12-02 Thread José Lorenzo
If you use label() and checkbox() separately, you re responsible for passing the correct attributes to those 2 functions. For example, for label() you will have to provide the 'for' attribute and for checkbox() the 'id' attribute. When using the input() function, the label and the checkbox will

Re: 3.0b3 - label[for] input[id] discrepancies

2014-12-02 Thread José Lorenzo
Why not use the form tempting system instead? The Form helper is very flexible in the way that it allows you to create your html On Tuesday, December 2, 2014 9:01:06 AM UTC+1, José Lorenzo wrote: If you use label() and checkbox() separately, you re responsible for passing the correct

Re: 3.0b3 - label[for] input[id] discrepancies

2014-12-02 Thread Joe Theuerkauf
Thanks for responding José. To address the first message, i understand i have to provide the attributes if i build the elements separately. That's what i thought i was doing. The first argument of label() is the [for] attribute (notice i didn't provide any options to label() except

Re: 3.0b3 - label[for] input[id] discrepancies

2014-12-02 Thread José Lorenzo
The first argument for label is not for, it is fieldName From the fieldName the for attribute is inferred. If you wish to provide you own for attribute, then use label('field_name', 'Label text', ['for' = 'field-id']); On Wednesday, December 3, 2014 6:14:34 AM UTC+1, Joe Theuerkauf wrote:

3.0b3 - label[for] input[id] discrepancies

2014-12-01 Thread Joe Theuerkauf
i'm a little confused about how labels inputs are assigned for/id pairs in FormHelper. Here's the code i have (it's inside a foreach of an entity collection): $attrId = 'Listing.ItemAttr.' . $attr-id; echo $this-Html-div('columns small-16 medium-8', $this-Form-label($attrId, // [for]