Sep 26, 2019 07:09 PM|uid953052|LINK
my form is dynamic, validation, works, however, the message is only showing for one section.:
There can be multiple sections of radio buttons on the page, I want the message to appear for each section that has nothing selected, right now, it's only appearing for the first section:
html: (builds the radio buttons)
foreach(var i in Model.Locations)
<input type="radio" id="@Model.LocationId" required="@Model.Required" name="@Model.Location"/> //is this a required field?
<span id="error" style="display:none">Please select a location</span>
var required = $(this).attr("required")var name = $(this).attr("name")
if(('input[type="radio"]) && (required == "required"))
if($(input:radio[class="loc" + n + "]:checked").length == 0)
the message shows, but only shows for the first radio group, even though I have 2 radio groups on the page that are required. I want to see the message on both groups that are required and nothing is checked:
this is my last project before I roll into retirement, but keeps me banging my head. . . . .