initiate dialog box after a postEdit event

initiate dialog box after a postEdit event

hbanaharishbanaharis Posts: 32Questions: 14Answers: 3
edited December 2017 in Editor

I'm using a postEdit event to send an email on a specific column status selection,

->on( 'postEdit', function ( $editor, $id, $values, $row ) {
    if ( $values['status'] === "recollect" ) { 
        $mail_sample = $row['client_sampleID']; 
        $mail_client = $row['client'];            
        qc_mail($mail_sample, $mail_client);
   }
} )

I would like at this point to initiate a dialog box with some further options prior to sending an email, eg for my example, why a recollect notice is being sent. Can this be done server side within the postEdit event function?

Answers

  • allanallan Posts: 61,887Questions: 1Answers: 10,141 Site admin

    What you would need to do here is use a client-side event handler (postEdit for example) rather than a server-side one. That way you can tell the client-side to display whatever form it is that you need for the additional options, and then submit them to another server-side script which will take that information and send the e-mail.

    Allan

This discussion has been closed.