I would really appreciate your help. Am using AngularJS to render questions in a quiz in the manner below:
<form name="form1" ng-controller="quizController" ng-submit="submit()">
<div class="form-group">
<span class="col-xs-3">What is your favorite color?</span>
<span><input type="radio" name="color" ng-model="color" ng-required="true" value="Red" />Red</span>
<span><input type="radio" name="color" ng-model="color" ng-required="true" value="Green" />Green</span>
<span><input type="radio" name="color" ng-model="color" ng-required="true" value="Blue" />Blue</span>
<span><input type="radio" name="color" ng-model="color" ng-required="true" value="White" />White</span>
</div>
<div class="form-group">
<button type="submit" class="btn btn-default">Submit</button>
</div>
</form>
ng-required is enforcing the requirement that one of the option must be selected. When no option is selected and the user clicks the submit button, all the options are highlighted in red and the text You must choose an option appears next to the first option. I would like to tweak this behaviour such that when no option is selected, it is the question text that appears in red. Thanks for your assistance