Field Errors - Auto Focus

Field Errors - Auto Focus

ZakInterDevZakInterDev Posts: 51Questions: 16Answers: 0

Hi there

So I've been looking how to switch off the auto focus when a field error is generated, and have come to the conclusion there isn't an option for this in datatables/editor. I also checked the dataTables.editor.js file and found that code that does the focusing, and even there it seems there isn't an indicator to switch off the focus.

Is this something that could be looked into? Having an option to switch that off, as select2 opens over the error message in my case. Or perhaps it there another way around this problem?

Thanks in advance!

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin
    Answer ✓

    Hi,

    Thanks for the suggestion. You are correct I'm afraid, there is currently no way to disable the focus (and scroll) to the error field. You'd need to modify the Editor code slightly to address that.

    I think this is a good idea to provide this ability and I've actually just committed it to the Editor source. It is implemented as a new onFieldError option for form-options and can simply be set to none to disable the auto focus now.

    The next release of Editor is likely to be 1.6 (rather than a 1.5.x release), so it might be a little while before this feature sees the light of day. Happy to send you a copy of the dev script if that would be useful. If so, should I use the e-mail address your account is registered with?

    Allan

  • ZakInterDevZakInterDev Posts: 51Questions: 16Answers: 0

    Yes you can use the same e-mail. That would be great, thanks Allan :)

  • allanallan Posts: 63,516Questions: 1Answers: 10,473 Site admin

    Sent :-)

This discussion has been closed.