Assign attributes to form elements

Posted 1 year ago by JokersMild85

I asked this question a couple of days ago but the answers I received did not resolve my problem. I am trying to assign attributes to form elements, namely an ID attribute to my form checkboxes. When I attempt to do this, all it does is set all the checkboxes in my form to checked. Any thoughts why this is happening and how to successfully assign my checkboxes an ID attribute?

@foreach($exercise_type->exercises as $exercise)

    {!! Form::label('exercise_name', $exercise->exercise_name) !!}
    {!! Form::checkbox( 'exercise[]', '{$exercise->id}_{$exercise->exercise_type_id}_{$exercise->exercise_name}', ['id' => '{$exercise->exercise_name}'] ) !!}


Please sign in or create an account to participate in this conversation.

Reply to

Use Markdown with GitHub-flavored code blocks.