i have created a form for user registration but the form will show or hide extra field if the user choose one of them
i have this field:
<div class="form-group row" style="display:none">
<label for="spec" class="col-md-4 col-form-label text-md-right">
{{ __('spec') }}
</label>
<div class="col-md-6">
<input id="spec" type="text" class="form-control @error('spec') is-invalid @enderror" name="spec" value="{{ old('spec') }}" autocomplete="spec" autofocus>
@error('spec')
<span class="invalid-feedback" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</div>
</div>
which is hidden by default
and i have these radio inputs:
<div>
<input type="radio" id="css" name="fav_language" value="CSS">
<label for="css">CSS</label><br>
<input type="radio" id="javascript" name="fav_language" value="JavaScript">
<label for="javascript">JavaScript</label>
</div>
so if the user chose first radio will hide the first field (spec) and if the user chose the 2nd radio the (spec) field will not be hidden anymore
how to achieve this using if statement?