Buy Now
Sign in

Get id in message "submission saved successfully "

cruser , October 11 at 18:37
C
cruser
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?
GreyHead
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
ChronoForms technical support
If you'd like to buy me a coffee or two, thank you very much
healyhatman
{var:save_data_action_name.id}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
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.}
healyhatman
Make a message element instead, with the text and code you want in it, call it in your switch with {fn:my_message}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
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
)

)

)
healyhatman
Okay?
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
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.
 [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                )        )
healyhatman
You have it there in your form data, {data: submission_id}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman
C
cruser
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.
no-id.jpg
Attachments
no-id.jpg
no-id.jpg
(103.96 KiB)
6 Downloads/Views