Kogkalidis Posted November 29, 2012 Share Posted November 29, 2012 I want to develop a custom module for booking rooms, tables and whatever it is.. And want to do the following.. Make a <select> ... </select> with options: 1. --Choose--, 2. 1, 3. 2 etc.. How can I check if clicking on submit button and the first option is selected to show some kind of message "you chose nothing for {select 1}, if you continue the field will be considered as null" ? Thanx in advance Link to comment Share on other sites More sharing options...
portal7 Posted November 29, 2012 Share Posted November 29, 2012 You could do the trick with some of script jquery before send... just like.... var $isSeleccted = $("#optionsAvailable").val(); if($isSelected == null || $isSelected == '' ){ // on this case you could show some div with the Error alert("you chose nothing for option "); } }); on your .tpl this shoul do the trick! PD: Of course that you should modify this javascript jquery script for adapt it at your convenience ..... Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now