Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I set a default radio button checked with boostcake? #58

Open
ghost opened this issue Mar 23, 2014 · 2 comments
Open

How do I set a default radio button checked with boostcake? #58

ghost opened this issue Mar 23, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Mar 23, 2014

I want to set "Medium" as the default radio button

echo $this->Form->input('priority', array(
        'type' => 'radio',
        'before' => '<label class="col col-md-3 control-label">Priority</label>',
        'legend' => false,
        'class' => 'radio-btn',
        'options' => array(
            1 => 'High',
            2 => 'Medium', 
            3 => 'Low'
        )
));
@develmts
Copy link

You can try:

    echo $this->Form->input('priority', array(
        'type' => 'radio',
        'before' => '<label class="col col-md-3 control-label">Priority</label>',
        'legend' => false,
        'class' => 'radio-btn',
        'options' => array(
            1 => 'High',
            2 => 'Medium', 
            3 => 'Low'
        )
      'value' => 'Medium'
    ));

@tino013
Copy link

tino013 commented May 30, 2015

Thank you, it works :)

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

No branches or pull requests

2 participants