Hello,
I have this form :
{{ Form::open(array('url' => "abbonementen")) }}
<div class="form-group">
{{ Form::select('soort1', ['Jaarabbonement', 'Knipkaart', 'Half-jaar abbonement', 'Kwartaal abbonement']) }}
</div>
@if ($soort1 != "knipkaart")
<div class="form-group">
{{ Form::select('soort2', ['Klein', 'Middel', 'Groot']) }}
</div>
@endif
<div class="form-group">
{{ Form::label('bedrag', 'Bedrag') }}
{{ Form::text('bedrag') }}
</div>
{{ Form::submit('Save', array('class' => 'btn btn-sucess')) }}
{{ Form::close() }}
What I want to achieve is that if a user chooses knipkaart on the first select box the user will not see the second checkbox. There is no small, middle or big knipkaart.
How can I make this work ?
Roelof
Add an id to the second select box then use javascript to hide the second box based on the first choice.
var $text = $( "#selectbox1 option:selected" ).text(); //selected option from first box
if $text = 'knipkaart' $( "#selectbox2).hide(); //hide the box
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community