I tried adding size attribute but that didn’t help and it produced output I don’t want. I know I can solve this by adding empty option but i dont want my users to be able to select empty option.
I may have been confused on which validation you are referring to.
The article is discussing HTML Markup Validation, were you referring to server-side form validation.
As or right now I am done validating form data using js and passing data to server via Ajax. My files are…
pagewithForm.php – this has my form in and some templates thats why I need it to be php instead of html
jscript.js – here I do some form validation and ajax call etc.
myphpfile.php – i am successfully receiving data from Ajax call
With current file structure and assuming one of my form fields is phone number how would i pass back an error on validating this in my pagewithForm.php to my pagewithForm.php.
I want to let user know “hey re-type this number please”