Ability to trigger workload from update account form

Sometimes, users have a need to trigger a workflow based on a user updating their account details - for exmple so they can update an address in MYOB/XERO/Salesforce or whatever.

On BC, this was not possible, but with the way that custom workflows can be triggered by a hidden input on forms in Treepl, this doesn’t seem like it would be out of reach if we could make it trigger the workflow in the same fashion.

Some use cases could also be to use zapier’s email parser on the workflow triggered to do something with the data on updates etc or just to notify a site admin that a user has changed their address / phone number so they can update their contacts list in phones etc.

1 Like

I agree, being able to specify the workflow for this form would be ideal.

There is also one other workaround, and that is to use a regular form. Because if a user enters different CRM info in a subsequent form submission, that new info replaces the old - effectively the same as an update form.
So being a regular form you can assign Workflow/s, autoresponder and various other things, even payment if needed.

Is this only when logged in that the forms update current data - if not, this could mean I can use someone else’s email in a treepl store to change their address or phone number to one of my choosing.

No, either logged in or not the form will override existing CRM details.

I can see why this is the case if a contact isn’t ‘verified’, since there is no real ‘ownership’ of that CRM record.
But if a contact becomes a “member” (ie: subscribed to a secure zone and verified their email address) their CRM data should be locked to this type of change IMO.
But that’s a seperate issue I guess.

1 Like

I have a similar issue on a Membership site.

When a Secure Zone Member updates a particular field in the CRM they should be sent an email with specific information & the person responsible for that information should receive an email stating a Member has updated the field.

There is no autoresponder for the Secure Zone Update and there is no workflow either.

If I create a Form in the Forms Module & copy the CRM Update code in the code works when the action is “/forms/accountupdate.ashx” but the autoresponder and workflow do not.

If I change the action to “/forms/cases.ashx?form=new_member_join_form&isSubscription={{this.isSubscription}}” the form submits but the field is not updated but the autoresponder and the workflow work.

Maybe the functionality has changed since you made this comment or I’ve mucked something up.

The other way would appear to be submitting a hidden form at the same time as the account update.

I’m not clear on how simultaneously submitting a hidden form works . Can you point me somewhere that shows how that works?


@peter.medbury if a member submits or edits a Custom Module item then you can have Workflows triggered for such cases. But if they are updating their own CRM record then yes, there are no Workflows (you could create a Backlog request for such functionality).
My workaround suggested above most likely will no longer work since v6.3 release as the ability for CRM details to be changed via regular forms has been changed (fixed).

Release notes:
Treepl CMS Features for Treepl Partners & CMS Resellers

That’s what I expected after 6.3 & I certainly appreciate the extra security.

I was actually surprised to see the autoresponder & workflow emails delivered & the form submitted with the update=success status. I was expecting an error status.

I will create a Backlog request.

In the meantime the solution might be to use a Custom Module to store a summary of changes to the CRM field, and fire the autoresponder and the workflow from a hidden form that submits at the same time as the CRM update…

@Peter-Schmidt - Can you add this item to the Backlog please.

Secure Zone Account Update Form functionality should include the AutoResponder and Workflows like Member Registration forms.

The Use Case is where a Secure Zone Member updates a particular field in the CRM and needs to receive additional information by email after the update and the person who manages that data needs to know the field has been updated.


Sure @peter.medbury - Please check if you have anything to add :slight_smile:

That looks OK to me Peter. I can’t find it in the public backlog though.

Hi @peter.medbury - Yeah I see that. I updated it and it should be visible in the portal shortly, and then still on this link: Include Autoresponder And Workflows In Secure Zone Account Update Form

@Adam.Wilson I am trying to trigger auto-response/workflow upon user Edit of Custom Module item. You mention a workaround of adding a hidden form, and also mention here “if a member submits or edits a Custom Module item then you can have Workflows triggered for such cases”… Had troubles, but I think I got this to work correctly.

– UPDATE – In case it helps anyone else –

To edit/update a Custom Module item (#form1) AND trigger a custom Auto-Response/Workflow (#form2), I used the following script to submit 2 forms simultaneously on submit by Member. Upon completion the page re-directs to desired URL.


function submitForms() {
    // Show load-spinner
    document.getElementById("load-spinner").style.display = "block";

    var form1Data = new FormData(document.getElementById("form1"));
    var form2Data = new FormData(document.getElementById("form2"));

    // Using AJAX to submit form1
    var xhr1 = new XMLHttpRequest();
    xhr1.open("POST", document.getElementById("form1").getAttribute("action"), true);
    xhr1.onload = function() {
        // Form 1 submitted, now submit form2
        var xhr2 = new XMLHttpRequest();
        xhr2.open("POST", document.getElementById("form2").getAttribute("action"), true);
        xhr2.onload = function() {
            // Form 2 submitted, redirect to the specified URL
            var redirectURL = document.createElement("input");
            redirectURL.type = "hidden";
            redirectURL.name = "redirectURL";
            redirectURL.value = "{{si.detect.href}}&message=Approved";

            var redirectForm = document.createElement("form");
            redirectForm.method = "POST";
            redirectForm.action = "{{si.detect.href}}&message=Approved"; // Specify the URL where you want to handle the redirection

            // Hide mdb-preloader after submission
            document.getElementById("load-spinner").style.display = "none";
1 Like