The focus blocked on field required

QuestionsThe focus blocked on field required
Massimo Gagliardi asked 10 years ago

Is't possible, in an add dialog, to block the focus on a field with controls how required, numeric, … if not correctly digited ?
Thanks for any suggestion

4 Answers
Abu Ghufran answered 10 years ago

Hello,

Your ticket was somehow missed and checking now.
Perhaps, it's too late but it may help someonhe.

Solution could be to apply some 3rd party input mask library.

http://www.google.com/search?q=jquery+input+mask

Also check faq: How to mask a field, for example like this: (NN) NNNN-NNNN ? N stands for number.

How-Tos & FAQs

Massimo Gagliardi answered 9 years ago

My interest isn't to mask an input field but on the possibility to block the focus in in that field in which have been inserted erroneous values instead of highlight the error in the add or edit dialog.
Regards

Abu Ghufran answered 9 years ago

What one can do is to validate field using JS function on blur event of field.
And if it is incorrect, reset it's focus on that field.

http://hastebin.com/acurobasaw.php
Refer line 62 and 127.

Massimo Gagliardi answered 9 years ago

Good, very good.
Thank you very much, Abu
Regards

Your Answer

9 + 16 =

Login with your Social Id:

OR, enter

Attach code here and paste link in question.
Attach screenshot here and paste link in question.



How useful was this discussion?

Click on a star to rate it!

Average rating 0 / 5. Vote count: 0

No votes so far! Be the first to rate it.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?