I am building a registration form. If the registration type selected (radio button) is "Self" I want to pre-populate the Number of ticket field with '1'. My Code:
index.html
<div class="containerx">
<h2>Registration type: </h2>
<ul id="ullu">
<li>
<input type="radio" id="f-option" name="regType" value="Self" required>
<label for="f-option">Self</label>
<div class="check"></div>
</li>
<li>
<input type="radio" id="s-option" name="regType" value="Group" required>
<label for="s-option">Group</label>
<div class="check"></div>
</li>
<li>
<input type="radio" id="t-option" name="regType" value="Corporate" required>
<label for="t-option">Corporate</label>
<div class="check"></div>
</li>
<li>
<input type="radio" id="fo-option" name="regType" value="Others" required>
<label for="fo-option">Others</label>
<div class="check"><div class="inside"></div></div>
</li>
</ul>
</div>
<fieldset class="form-fieldset ui-input __first" style="z-index: 0">
<input type="number" required id="ticket" tabindex="0" name="ticketNo" min="1" max="25"/>
<label for="ticket">
<span data-text="Number of Tickets (Not more than 25)">Number of Tickets (Not more than 25)</span>
</label>
</fieldset>