I have a php app, that has been pieced together, but I am working on an crazy validation piece, that i've got working. At the end of the validation, the following function runs and gives me a popup with the listed of required fields.
function showReqFlds(emptyFlds) {
for (var i = 0; i < emptyFlds.length; i++) {
var holdErrMsgs = emptyFlds[i]+' is required.' + "
";
}
alert(holdErrMsgs);
}
Works great, but now I want instead of the javascript popup box, I want the error messages to appear in a fieldset at the top of my form.
Steps:
User opens form, error fieldset is not displaying User clicks the submit button to submit form, but has not filled in a couple of the required fields Error fieldset appears, shows required field list, form is not submitted.
Any assistance would be appreciate. Thank you.