Change active bootstrap 5 tab on field error

Change active bootstrap 5 tab on field error

AxendoNLAxendoNL Posts: 6Questions: 2Answers: 0

I have exactly the same problem as described here:
https://datatables.net/forums/discussion/59394/editor-field-validation-in-form-with-tabs

however with client side validation error I can't seem to act on them on the preSubmit event. How can I catch the field errors and act on them?

Answers

  • allanallan Posts: 63,434Questions: 1Answers: 10,458 Site admin

    When you say you can't act on them, do you mean some DOM manipulation or something else? The thread you linked to was about seeing the fields when they enter the error state, not acting on them.

    Allan

  • AxendoNLAxendoNL Posts: 6Questions: 2Answers: 0

    Sorry I meant when a field error is present (or occurs if that is possible) I want to read that error and place the text somewhere else or change the active tab/do som DOM manipulation. Because now with the bootstrap 5 tabs implemented in my editor template, if an error occurs on a different tab the editor won't show anything, only if you switch to the tab the validation error occured you can see it.

  • AxendoNLAxendoNL Posts: 6Questions: 2Answers: 0
    edited May 28

    @allan

    Nevermind I needed the postSubmit, so i could get the fielderrors from the serverside. please close.

Sign In or Register to comment.