- Mark as New
- Follow
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report
I had the same issue in the past and looking forward for a right answer..
To resolve this issue in our earlier forms we did the following..
We have written a custom Javascript function to validate the date format entered. We have executed the java script function in the Validate event of the field and if the format is not correct, then we will erase the data and force the user to stay in the field until they enter the correct format.
To make the user aware of the format, we had added a text with the expected format either in the caption or below the input area of the date field.
In the change event of the field we restricted the input to 10 characters and allowed only to enter numbers and slash (/) only.
//Restrict the input to 10 digits
if(xfa.event.newText.length >10)xfa.event.change = "";
//Allow only numbers and slash
if (xfa.event.change.match(/[0-9\/]/) == null)
xfa.event.change = "";
Thanks
Srini
Views
Replies
Total Likes