Buy Now
Sign in

Get id in message "submission saved successfully "

cruser , October 11 2018
C
cruser 46
October 11 2018 #380714
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 63.4
October 12 2018 #380727
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 5.7
October 13 2018 #380761
{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

You can now copy+paste code from forums
C
cruser 46
October 15 2018 #380795
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 5.7
October 15 2018 #380807
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

You can now copy+paste code from forums
C
cruser 46
October 18 2018 #380905
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 5.7
October 18 2018 #380915
Okay?
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums
C
cruser 46
October 18 2018 #380916
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 5.7
October 18 2018 #380917
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

You can now copy+paste code from forums
C
cruser 46
October 18 2018 #380918
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)
306 Downloads/Views
healyhatman 5.7
October 19 2018 #380926
    [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}
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums
C
cruser 46
October 30 2018 #381148
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:
  • Work order saved successfully {data:submission_id
healyhatman 5.7
October 30 2018 #381149
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.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums
C
cruser 46
October 30 2018 #381151
Would that function {fn:success_message} be a switch?
healyhatman 5.7
October 30 2018 #381152
No, a message.
Web developer at SkySpider.com.au
I don't work for ChronoEngine but I do accept donations paypal.me/healyhatman

You can now copy+paste code from forums
C
cruser 46
October 30 2018 #381153
healyhatman thank you for your patience and help. I can now see the id when saved.