I want to display textarea or text input if the user select a specific choice in form
I tried to use if but even the choice (radio) doesn't display
view :
@elseif($question->question_type === 'checkbox')
@foreach($question->option_name as $key=>$value)
@if($value === 'else')
<input type="checkbox" id="" name="[answer]" value=""/>
<input type="text" name="[answer]" placeholder="Votre commentaire"/>
<label for=""></label>
@else
<p style="margin:0px; padding:0px;">
<input type="checkbox" id="" name="[answer]" value=""/>
<label for=""></label>
</p>
@endif
@endforeach
The question's choice is array ,the table :
The else choice doesn't display in the page
Aucun commentaire:
Enregistrer un commentaire