Skip to content
This repository has been archived by the owner on Nov 12, 2021. It is now read-only.

support for multiple class on radio button #35

Open
alwex opened this issue Dec 6, 2013 · 1 comment
Open

support for multiple class on radio button #35

alwex opened this issue Dec 6, 2013 · 1 comment

Comments

@alwex
Copy link

alwex commented Dec 6, 2013

Currently it is not possible to build an inline radio button form becase the decorator always set the label_class attribute to radio.

here is a suggestion to allow to add custom classes to radio button label

if ($e->getType() == 'Zend_Form_Element_Radio') {
$e->setDecorators(self::$_MultiDecorator[$format]);
$e->setSeparator('');
if ($e->getAttrib('label_class') != null) {
$previousClass = $e->getAttrib('label_class');
$e->setAttrib('label_class', $previousClass . ' radio');
} else {
$e->setAttrib('label_class', 'radio');
}
}

@Mischosch
Copy link
Contributor

if you want to, create a PR for it and we will look into integrating it

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

No branches or pull requests

2 participants