What is submitUnsuccessful event proposed to return?

What is submitUnsuccessful event proposed to return?

Tester2017Tester2017 Posts: 145Questions: 23Answers: 17

Using the submitUnsuccesful event in Editor: editor.on('submitUnsuccessful', function(e, xhr, err, thrown, data), I expected to receive some values in i.e. err. But err, thrown and data are undefined.

I tried to use this because I want to know if there were fields invalidated by the server. The event is called when fields are invalid, but there is nothing inside err, thrown and data. I have to assume that on server-side I am not using DataTables and yes my own PHP routines.

I resolved my need by using the event postSubmit, but I thought that I could use an event more relevant for my needs.

This question has an accepted answers - jump to answer

Answers

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

    The submitUnsuccessful documentation shows that the information passed into the event handler is e and json.

    The JSON data returned from the server contains information about what fields are in error. The JSON structure for this is documented here - specifically fieldErrors is probably want you'd want to look at.

    Allan

This discussion has been closed.