Hi All,
I want the input to be between 1000000000 and 999999999. In other words to have only 10 digits. If possible I would prefer to use a hooks file.
Regards Barry
conditional numerical input
- baudwalker
- Veteran Member
- Posts: 188
- Joined: 2015-02-03 08:08
- Location: Bellingen NSW Australia
Re: conditional numerical input
Hi Barry,
you can add to the TABLENAME-dv-js something like
Replace FIELDID with the fieldname you are targeting.
you can add to the TABLENAME-dv-js something like
Code: Select all
$j(function(){
$j('#FIELDID').attr('pattern','[1-9]{1}[0-9]{9}');
})
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
- baudwalker
- Veteran Member
- Posts: 188
- Joined: 2015-02-03 08:08
- Location: Bellingen NSW Australia
Re: conditional numerical input
absolutely brilliant, thank you. The next trick is to change the default error message.
I tried to add [ setCustomValidity('custom messageer') ] without success. its just a matter knowing where to plonk things.
Barry
I tried to add [ setCustomValidity('custom messageer') ] without success. its just a matter knowing where to plonk things.
Barry