Disabled generated "send_receipt" value
Linked to Issue 74 and Issue 71
because civicore is checking for emptyness of the send_receipt
variable, setting it here is causing an override. When a user goes to disable it on their browser, somehow, this element is still getting passed back and is requesting an email to be sent.
Just a hypothesis, i think this is creating something in serverside memory or a shadow DOM.
when you set the value to 0, and remains deselected in the UI, this field isn't sent from the client to the server. (this happens anyway without this change) and no email is sent to the user, as intended.
but, with this value set to 1, even though the client doesn't send the field send_receipt
, somehow it is still being populated, causing the !isEmpty($params)
to carry on through the code block.
This may not be the best suggestion, but it has fixed my unintended emails.
User experience is changed in that the field is now default to unchecked meaning you have to click send receipt each time.