I'm trying to echo an input (specifically an input type text) when the user checks a checkbox. This input appears and then send the data typed by the user into the database, is this doable with laravel blade? since I'm currently using laravel 5.5
I tried doing something like this, but still it won't work
<label for="" class="radio-inline mx-2">
<input type="checkbox" name="chequear_ente" id=""> Ente
</label>
@if (isset($_POST['chequear_ente']))
{{ "<input type='text' name='ente' id=''>" }}
@endif
Maybe is not the best solution but what I could do in this case, if it's possible with either laravel or html (I wouldn't mind using javascript though) ? I also won't send the checkbox to the controller only the data from the echoed input (which I will also make optional)