How to use the "Task Control" in your connection.
One of the advanced features of the new Connectivity is the ability to trigger different actions through Chronoforms before/after running any of the connectivity tasks like listing/reading/deleting/updating the data.
For example, I would like to display a message above my articles list using a "Show Thanks Message" action, or even send an email to myself when anybody access the list or process any group of Chronoforms actions, here is how to do that:
First, I will need to create a new event in the form assigned to my connection, let's call it "listing", I will also drag a "ChronoConnectivity Task" action inside the new created event, and also a "Show Thanks Message" action to display the message I need above the listing, as shown below:
Please pay attention to the action order number (10) which is written in red between 2 brackets beside the action's name, we will need this number when we setup the task control inside the connection.
Let's head back to our connection's edit page, under the "Front Editing" tab > "List Data Task Control", we will need to enter the "List action order" which is "10", and the "List event" which we called "listing":
Great, let's save and check the frontend result:
As you can see, the thanks message has been "processed" before the listing task, the end result depends on the type of action you have used, if you use an "Email" action then you will not see any extra output, you may also use some conditional action to block the access to the listing based on some rule and so on.
I also want to note that the "Chrono Connectivity Task" does NOT have to be under the same event triggered for the task control, in the example above, the "listing" event will be triggered every time the index page of the connection is accessed, but this event may contain a simple form with 1 or 2 fields, which submits to a different event with the "Chrono Connectivity Task" action, for example, you may use this to display a confirmation message or ask for some user info...etc, this comes handy with other types of task control for editing/updating/deleting...etc