Yes, in the data provider you could add: {data:Data2}, and then you could access the new data set using {var:modify_daya_fn_name}, you can use that to pass the new data set to a data save function for example.
But you may also modify the new data set using the data override, you could add this:
created_by:111
So you would get the full Data2 data but the "created_by" value would not be the same, it would be "111" instead.
I think this also answers another question of mine: If we are using the line separated list of conditions for a DB action, I'm assuming we would be listing the conditions as:
field_name:value
So if I wanted to read a row as defined by a contact id I have in a url param (I use eid), I would simply use a php action named getEid:
Everything is still working great, but I was just wondering, what happens if you have a url param with the same name as a field? As I understand it, they would both be referenced as stated in the instructions:
{data:PARAMETER_NAME} Get a url parameter or a form input value.
Is there a priority (like if you have a field named "eid" and a url param, also named "eid", {data:eid} returns the value of the field)?
In CF5, I would use a Custom action with php code:
I could do similar in CF6 using a PHP action in the Custom section and this code:
I assume the Modify Data action was included to make this easier maybe?
Yes, in the data provider you could add: {data:Data2}, and then you could access the new data set using {var:modify_daya_fn_name}, you can use that to pass the new data set to a data save function for example.
But you may also modify the new data set using the data override, you could add this:
So you would get the full Data2 data but the "created_by" value would not be the same, it would be "111" instead.
Best regards,
Max
ChronoForms7 Video Tutorials
I think this also answers another question of mine: If we are using the line separated list of conditions for a DB action, I'm assuming we would be listing the conditions as:
So if I wanted to read a row as defined by a contact id I have in a url param (I use eid), I would simply use a php action named getEid:
And in my DB Read action's Where section:
That would work, but there is a shortcode for getting the request parameters directly:
{data:eid}
Best regards,
Max
ChronoForms7 Video Tutorials
{data:PARAMETER_NAME}
Get a url parameter or a form input value.
Is there a priority (like if you have a field named "eid" and a url param, also named "eid", {data:eid} returns the value of the field)?
Yes, the field value has priority because its in the post array.
Best regards,
Max
ChronoForms7 Video Tutorials