入力フィールドが入力されたとき(空ではない)ラジオボタンにチェックマークを付ける必要があります。したがって、「電話番号」フィールドが記入されると、ラジオボタンにはSMSがすぐにチェックされます。これが可能なら誰でも考えがありますか?フォームの特定の入力フィールドが空でないときにラジオボタンの選択を変更する方法
<div class="form-group phone-field row row-eq-height">
<div class="col-sm-4">
<label for="inputPhone">Phone number (optional)</label>
</div>
<div class="col-sm-4">
<div class="form-inline">
<div class="form-group">
<label class="prepend">+32</label>
<input type="text" class="form-control" name="phonenumber" id="inputPhone" placeholder="" value="">
</div>
</div>
</div>
</div>
<div class="switch-button row row-eq-height">
<div class="col-sm-4"><label for="contact_style">Receive your token by</label></div>
<div class="col-sm-4">
<div class="switch-field clearfix">
<input type="radio" id="switch_left" name="contact_style" value="email">
<label for="switch_left">EMAIL</label>
<input type="radio" id="switch_right" name="contact_style" value="sms">
<label for="switch_right">SMS</label>
</div>
</div>
</div>
。ラジオボタンを更新する onkeyupの「を使用あなたはまだ何を試してみました? – Cruiser