Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

radio choice form builder does not render attr #8051

Copy link
Copy link
Closed
@AdamQuadmon

Description

@AdamQuadmon
Issue body actions

I'm trying to add attributes to my rendered radios

$builder
    ->add('myRadios', 'choice', array(
        'choices' => array(
            'one' => 'uno',
            'two' => 'due'),
        'multiple' => false,
        'attr' => array('class' => 'testClass'),
        'expanded' => true

the output is:

<div class="control-group">
    <label class="control-label required">Myradios</label>
    <div class="controls">
        <label for="form_one_0" class="required radio">
            <input type="radio" id="form_one_0" name="form[one]" required="required" value="uno" />
            <span>Uno</span>
        </label>
        <label for="form_two_1" class="required radio">
            <input type="radio" id="form_two_1" name="form[two]" required="required" value="due" />
            <span>Due</span>
        </label>
    </div>
</div>

no references to class='testClass'

I can't find any issue online

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.