-
-
Notifications
You must be signed in to change notification settings - Fork 94
Separating / removing label from checkbox or radiobutton #71
Comments
You may close thie request since it can be achieved by rendering the checkbox via forminput view helper instead of formcheckbox: <tr>
<td class='right-label'><?php echo $this->formLabel($contract->get('show_in_oem')); ?></td>
<td><?php echo $this->forminput($contract->get('show_in_oem')); ?></td>
</tr> |
I am not sure how to re-open my issue. My last workaround to get a checkbox without label was this: <tr>
<td class='right-label'><?php echo $this->formLabel($contract->get('show_in_oem')); ?></td>
<td><?php echo $this->forminput($contract->get('show_in_oem')); ?></td>
</tr> Unfortunately this prevents the checkbox value from being set f.e. when binding an object to the form that has a value set to '1'. My hydration is correct and when I switch back to the formcheckbox helper the value is set but the label appears. |
Can you please check my latest post, @neilime and have look if this issue might be reopened? I see no option to do this myself.Thanks! |
With the last version, you can set the |
Great and quick fix, @neilime . Thank you very much. For anybody interested this is the view script code to have the label separated from the checkbox by table rows: <tr>
<td class='right-label'><?php echo $this->formLabel($contract->get('isWaresfilter')); ?></td>
<td><?php echo $this->formcheckbox($contract->get('isWaresfilter')); ?></td>
</tr> The cool thing is that the label can still be identified by the formLabel view helper allthough disable-twb was set. Closing. |
For generating a checkbox my current view would look like this:
Which then would generate:
As you can see I have to separate the label from the checkbox.
Now, after switching to twb the same code generates this HTML:
When disabling TWB via elements' options this is the result:
Though I know that appending the label to the checkbox may be the expected Twitter Bootstrap 3 behaviour for horizontal forms maybe there are use cases where the label needs to be separated.
Is there an option to achieve this?
The text was updated successfully, but these errors were encountered: