Unable to Remove STAF and Receipt Email Options


#1

Set the Receipt Recipient Form Field and STAF Recipient Question under the Email Options of a form.

I am now handling the emailing via a PHP backend API call so no longer require these options to be selected.

When I attempt to reset the values back to none and commit, the changes are not commited.

The green banner states that the changes are commited, all other changes are commited but these two options cannot be cleared once they are set and the emails are still being sent.


(Emily) #2

Hi Michael,
I havenā€™t encountered this problem myself, but usually what I do is just remove the email addresses from the ā€œToā€ field (and make sure to clear the Asset Selector if it was used).

Perhaps a screenshot would help to see exactly what the error message is, and if you have cleared all the sections?
Also, which version of Matrix are you using?
Is it self-installed on your servers, or supported/hosted by Squiz servers?

I know when my self-installed Matrix was setup there were a few modules that didnā€™t install 100% correctly and had to be fixed.

  • Emily

#3

Yeah, Iā€™ve removed the emails from the To field but I canā€™t manage to clear the Asset Selector.

Iā€™ve logged a job with Squiz to get them to force clear it.

A workaround I used was just pointing the asset selector at a text-field on the form that does not contain a valid email address, just as a quick-fix.

The system is cloud-hosted by Squiz.

And no error is being given. I can clear the Asset Selector but when I click ā€˜Commitā€™ the asset selector is no longer cleared and the original value is place back where it was. I can change the asset the selector is pointing at, but it cannot be set to clear/null.

Itā€™s really weird.


(John gill) #4

Sounds like a UI bug.

You could probably bypass it with the JS API, as these settings are stored in Attributes on the Form Contents asset. Youā€™d need to rustle up some JS for reading and writing PHP serialized strings though.


If you drop both of those functions into a page with the JS API already on it then you could do something like

Warning, this code is gross. For entertainment purposes only.

js_api.getAttributes({
	asset_id:"18496", 
	dataCallback: (e) => window.debug = e
});

var q = unserialize(debug.staf_format)
q.to_assetids = [];

js_api.setAttribute({
	asset_id:"18496", 
	attr_name:"staf_format", 
	attr_val:serialize(q), 
	dataCallback: (e) => console.log(e)
})

(Lisa) #5

Iā€™m having the exact same issue. I remove the form field ID from ā€œReceipt Recipient Form Fieldā€ and commit, and the form field is there again.
What was Squizā€™s response, out of curiosity?


#7

They verified that it is a bug. Response was to upgrade to a newer system.

As a temp measure I just pointed to an alternative response on the form that will not produce an email.

A bit gross as we may not make the update due to the downtime.


(Amurray) #8

1/10/2021 here, Squiz Matrix v5.5.0.2 version - this workaround is still confirmed as option to go with.