How to pass non-database info in my Ajax call?

How to pass non-database info in my Ajax call?

TomBajzekTomBajzek Posts: 163Questions: 36Answers: 1

My app needs to send a notification email when and only when a new database record is being created. If I can know the editor mode when I am processing the Ajax call, I can know when to send the notification. It looks like the editor mode carries that information. How can I pass the editor mode (create/edit) to the Ajax routine for my editor, and how do I access this parameter in the PHP that services the Ajax call? (Can I defineand process a Field that is not a database column?)

Thanks,
Tom

Replies

  • allanallan Posts: 61,725Questions: 1Answers: 10,108 Site admin
    edited April 2017

    Hi Tom,

    Sounds like a perfect use case for a server-side event - specifically the postCreate event in this case.

    edit The event handler is given the form information as a parameter.

    Allan

  • TomBajzekTomBajzek Posts: 163Questions: 36Answers: 1

    Allan,

    Thanks for your suggestion. It does seem to be the straightforward was of handling this.

    Thanks,
    Tom

This discussion has been closed.