- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-26-2024 11:39 PM
Hi All,
How top make the select box mandatory with sysmbol(*) it should come and how to increase the size of select box.
<div id="box" >
<label for="selectBox">Reason of Visit : Office</label>
<select id="selectBox" ng-model="data.selectedOption">
<option value="">--Select an option--</option>
<option value="a">Option A</option>
<option value="b">Option B</option>
<option value="c">Option C</option>
</select>
</div>
Thanks and Regards,
Chandan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 12:21 AM
Hi Chandan,
You can modify this code as below
<div id="box">
<label for="selectBox">
Reason of Visit: Office <span style="color: red;">*</span>
</label>
<select id="selectBox" ng-model="data.selectedOption" required style="width: 200px; height: 30px;">
<option value="">--Select an option--</option>
<option value="a">Option A</option>
<option value="b">Option B</option>
<option value="c">Option C</option>
</select>
<span style="color: red;" ng-show="form.selectBox.$error.required && form.$submitted">This field is required.</span>
</div>
Please hit like if this helps your question.
Thanks,
Sindhu K M
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 12:21 AM
Hi Chandan,
You can modify this code as below
<div id="box">
<label for="selectBox">
Reason of Visit: Office <span style="color: red;">*</span>
</label>
<select id="selectBox" ng-model="data.selectedOption" required style="width: 200px; height: 30px;">
<option value="">--Select an option--</option>
<option value="a">Option A</option>
<option value="b">Option B</option>
<option value="c">Option C</option>
</select>
<span style="color: red;" ng-show="form.selectBox.$error.required && form.$submitted">This field is required.</span>
</div>
Please hit like if this helps your question.
Thanks,
Sindhu K M