Returning a non-error warning message from Editor?

Returning a non-error warning message from Editor?

htwyfordhtwyford Posts: 23Questions: 9Answers: 1

I am making a scheduling application. In the event that a user schedules an employee for more than 40 hours, I would like to display a JS dialog box warning the user. I would still like to save the data, since an employee could very well be working overtime. I can't do this as single-field validation, since that 40 hours might be spread out across several tasks, so it would have to be a server-side check.

To make matters more complicated, I'm having to define my own client/server responses, so if this feature exists in the .NET/PHP libraries, I couldn't use it.

Does anyone have experience returning a warning message like this?

This question has an accepted answers - jump to answer

Answers

  • allanallan Posts: 61,453Questions: 1Answers: 10,055 Site admin
    Answer ✓

    What I would suggest doing here is listening for the submitComplete where you will be able to get the JSON response from the server. Then all you need to do is include the message that you want to display in the JSON response and display it if it is present.

    Regards,
    Allan

  • htwyfordhtwyford Posts: 23Questions: 9Answers: 1

    Thank you Allan! An elegant solution.

This discussion has been closed.