jahyax Posted February 21, 2014 Share Posted February 21, 2014 Good day, on price.js i created a function like: public function myFunction(){ .................. } and on price.tpl i added custom input just below Pre tax retail price <tr> <td><input type="text" name="custom_input" class=''custom_input" value=""></td> </tr> i would my function to called when i hit the save button and verify if the input is correct like: .....alert('your input is not a number, please input a proper value'), can someone please point me to the right direction where to call the function 'myFunction' so that it will prompt the user to input a proper value before even saving the value into the database.. Link to comment Share on other sites More sharing options...
vekia Posted February 21, 2014 Share Posted February 21, 2014 check this: http://stackoverflow.com/questions/8292156/how-to-validate-the-form-before-submit Link to comment Share on other sites More sharing options...
jahyax Posted February 24, 2014 Author Share Posted February 24, 2014 Vekia Good day! thanks for giving the link for javascript form validation. but what i really want to know is where do I place or call the function 'myFunction' so that when I click the save button on the header the value will be validated first before it is being saved.. 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