Skip to content
This repository has been archived by the owner on Jul 10, 2020. It is now read-only.

Horizontal form and radio #97

Closed
sul4bh opened this issue Jul 21, 2014 · 3 comments · May be fixed by #102
Closed

Horizontal form and radio #97

sul4bh opened this issue Jul 21, 2014 · 3 comments · May be fixed by #102
Labels

Comments

@sul4bh
Copy link
Contributor

sul4bh commented Jul 21, 2014

I have an element:
http://pastebin.com/dcScBdd0

HTML generate for that element is:
http://pastebin.com/MQj55YdC

This is how the element looks like:
https://www.evernote.com/shard/s216/sh/0e54c67f-b182-4ac4-b953-af15391e4306/bd90304ddd6df139ce1aa19fc5de11df/deep/0/General-Information---ETSU-CBAT-Scholarship-Application.png

We see that the both the field label and the label for radio takes the col-sm-8 class. Can we assign different classes to these labels?

@neilime neilime added the bug label Aug 11, 2014
@sul4bh
Copy link
Contributor Author

sul4bh commented Aug 13, 2014

@neilime
Copy link
Owner

neilime commented Aug 13, 2014

Please can you try the verly last version on branch master; An update has been made to improve checkbox rendering

@bogal
Copy link

bogal commented Aug 14, 2014

I too am having similar issues with radio labels. Within my form i create this element:
$this->add(array(
'name' => 'locationId',
'type' => 'Zend\Form\Element\Radio',
'options' => array(
'label' => 'Location:',
'value_options' => $locationData,
'column-size' => 'sm-10',
'label_attributes' => array(
'class' => 'col-sm-2'
)
),
'attributes' => array(
'required' => true
)
));

...which renders the following html:

< label class="col-sm-2 control-label">Location:</ label>
< div class=" col-sm-10">
< div class="radio">
< label class="col-sm-2 control-label">
< input name="locationId" required="required" value="3" type="radio">Location 1, region, county</ label>
</ div>
</ div>

...where the label for the radio option has been assigned the same class / column width as the elements label.

I ran a composer update this evening (f17bc68).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants