In CC6 I am able to edit and save a record that was submitted through CF6. Once saved I get the message "submission saved successfully.". How can I add the id of the record that I just saved inside of that message so it reads for example "submission 271 saved successfully". To even go a step further is there a way to link to that submission via the id in the message?
Forums
Get id in message "submission saved successfully "
Hi cruser,
I'm no expert on CCV6 but I would expect the new record id to be added to the available data after the Save action. if you add a Debugger action temporarily you should be able to see what that is called.
Bob
I'm no expert on CCV6 but I would expect the new record id to be added to the available data after the Save action. if you add a Debugger action temporarily you should be able to see what that is called.
Bob
{var:save_data_action_name.id}
healhatman - where would I put that code? Currently I have a Function setup that checks the save result. One or two appear:
true:{success:Work order saved successfully. }
false:{error:saving the submission failed.}
So should the code look like :
true:{success:Work order {var:save_data_action_name.id} saved successfully. }
false:{error:saving the submission failed.}
true:{success:Work order saved successfully. }
false:{error:saving the submission failed.}
So should the code look like :
true:{success:Work order {var:save_data_action_name.id} saved successfully. }
false:{error:saving the submission failed.}
Make a message element instead, with the text and code you want in it, call it in your switch with {fn:my_message}
Here is what the debug is showing
Array ( [cont] => manager [conn] => prsort [event] => save [submission_id] => 217 [Submission] => Array ( [id] => 217 [work_order_assigned_to] => Elton Edwards [work_order_assignment_date] => 2018-08-09 [textarea20] => Curry Roberts Test [work_order_status] => In Progress [work_order_completion_approved_by] => Garry Moore [work_performed] => TestingMore testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.v [work_contractor] => More testing. And even more. ) [po] => [button54] => [format] => html [Itemid] => 245 [option] => com_chronoconnectivity6 [view] => connection )
Array ( [save_submission] => Array ( [data] => Array ( [id] => 217 [work_order_assigned_to] => Elton Edwards [work_order_assignment_date] => 2018-08-09 [textarea20] => Curry Roberts Test [work_order_status] => In Progress [work_order_completion_approved_by] => Garry Moore [work_performed] => TestingMore testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.v [work_contractor] => More testing. And even more. ) [_success] => Data saved successfully [log] => Array ( [0] => UPDATE `iol0d_chronoforms_data_maintenance-request` AS `Submission` SET `work_order_assigned_to` = 'Elton Edwards', `work_order_assignment_date` = '2018-08-09', `textarea20` = 'Curry Roberts Test', `work_order_status` = 'In Progress', `work_order_completion_approved_by` = 'Garry Moore', `work_performed` = 'TestingMore testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.v', `work_contractor` = 'More testing. And even more.' WHERE `id` = '217'; ) [var] => Array ( [work_order_assigned_to] => Elton Edwards [work_order_assignment_date] => 2018-08-09 [textarea20] => Curry Roberts Test [work_order_status] => In Progress [work_order_completion_approved_by] => Garry Moore [work_performed] => TestingMore testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.v [work_contractor] => More testing. And even more. ) ) [check_save_result] => Array ( [finished] => 1 [var] => Array ( [{data:submission_id}{success:Work order saved successfully. Curry is working on the edit/print features.}] => 217 ) ) )
Okay?
I'm stuck. Right here
I cannot for the life of me get the id of the order that I just edited to show up in the success message.
I cannot for the life of me get the id of the order that I just edited to show up in the success message.
[check_save_result] => Array ( [finished] => 1 [var] => Array ( [{data:submission_id}{success:Work order saved successfully. Curry is working on the edit/print features.}] => 217 ) )
You have it there in your form data, {data: submission_id}
I'm obviously not placing the correct code in the correct place but the idea is that when someone edits (for example) order id#232. They open it, edit it and save it. When the redirect to the index happens the message appears "Work order saved successfully". What I am trying to get is "Work order #232 save successfully". If you can explain it like I'm in fourth grade that would help.

[cont] => manager [conn] => prsort [event] => save [submission_id] => 217 [Submission] => Array ( [id] => 217 [work_order_assigned_to] => Elton Edwards [work_order_assignment_date] => 2018-08-09 [textarea20] => Curry Roberts Test [work_order_status] => In Progress [work_order_completion_approved_by] => Garry Moore [work_performed] => TestingMore testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.More testing. And even more.v [work_contractor] => More testing. And even more. ) [po] => [button54] => [format] => html [Itemid] => 245 [option] => com_chronoconnectivity6 [view] => connection)Like I said if you look at that, that's your {data:}. So it should be tehre under {data:submission_id}
Shouldn't the code process? What I have in the check_save_result function is:
true:{success:Work order saved successfully {data:submission_id}}
false:{error:saving the submission failed.}
What the end user sees:
true:{success:Work order saved successfully {data:submission_id}}
false:{error:saving the submission failed.}
What the end user sees:
- Work order saved successfully {data:submission_id
No can't use nested shortcodes like that.
Trying true:{success:Blah blah blah (data:submission_id)} or make the messages a function instead (it's in there) and use {fn:success_message} and put the {data:} tag inside the message element.
Trying true:{success:Blah blah blah (data:submission_id)} or make the messages a function instead (it's in there) and use {fn:success_message} and put the {data:} tag inside the message element.
No, a message.
This topic is locked and no more replies can be posted.