I need to disable/enable a button depending on what option
the user choose on the dropdown menu
. Using the code below it will disable the button if one trip
is paid even thought I select a different trip it will stay disabled
code:
<div class="form-group">
<select onchange="showOptions(this)" id="tripSelect">
<option value="" disabled selected align="center">-- Choose Trip --</option>
<?php $z = 0; ?>
@foreach($event_groups as $event_group)
<?php
...
?>
@if($event)
<option class="dd" value="{{$optionID}}">{{$event->trip_name}}</option>
// some trips are paid
@endif
@endforeach
</select>
</div> 
<?php
...
?>
@if ( EUser::noOneHasPaid( $booking_id ) ) // if not yet paid then enable
<a class="btn-success invitation" id="add">Add Friends</a>
@else //else disable button
<button class="btn-success" disabled>Add Friends</button>
@endif
Please help me.