Clear Signature with Automate Actions?
Posted: 24 Apr 2024, 00:39
I have a signature field and a date field for when the signature is added. I have the signature field set to trigger an automate action to set the date of when it was signed. The action for this is set to Enter Manually (no) and Value (0) to add the current date.
I'm trying to add an automate action button that will clear both the date and signature. This is what I have so far, set to a "execute php script".
This will remove both of them and in the database, the date field is set to "0". However, if I add the signature again, the date field does not get filled with the date and remains as "0". What am I missing or doing wrong here?
Also, for the signature image, where are these stored and how do I remove them?
I'm trying to add an automate action button that will clear both the date and signature. This is what I have so far, set to a "execute php script".
Code: Select all
$entity_id = 96; //get entity ID
$item_id = [id]; //get current item ID
//prepare data to update
$data = [
'field_1606' => '', //Clear signature
'field_1613' => ' ' //Clear signature date
];
//run item update by id
items::update_by_id($entity_id,$item_id,$data);
Also, for the signature image, where are these stored and how do I remove them?