post before returning to list chronoconnectivity

Paolo.Ferlini 04 Oct, 2014
hi all,
i'm going mad !

i've a custom list in cc5 and when i press the new ( or edit button ) a cf5 form will be loaded.

i need to activate an server side php via
jQuery.post("/includes/CreaEvento.php",{PostVar: PostVar}, function (response) {
jQuery("#custom_message_area").html(response); });


for to be clean i've placed a javascript function calling jQuery as last statement on custom code #19
[attachment=0]Screenshot from 2014-10-04 14:42:23.png[/attachment]

it only works if i remove the connection_action #29.

this activation can be done before or after submit, is irrilevant

can you help me ?
Paolo.Ferlini 04 Oct, 2014
it only works if i remove the connection_action #28.

sorry
Max_admin 06 Oct, 2014
Hi Paolo,

Why do you have the "connection action" here ? its not needed when you you load the data from CC

Regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Paolo.Ferlini 06 Oct, 2014
I inserted this action for saving data and returning back to the list.

I'm wrong ?
:-)

Thanks Max
Max_admin 06 Oct, 2014
1 Likes
Sorry!!!

Yes, you are correct, I thought this is the "on load".

So, why do you have HTML action and Javascript action here ? those should be in the "on load" event, when the form is displayed!!
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Paolo.Ferlini 06 Oct, 2014
You're right as usual 🙂

but without this event the code are not executed ( i don't know why ).

seem that only after the rendering the javascript inside my custom code is included in the html and then executed.

But after the test, i've reinserted the connection and nothing happens .... seem that the connection is called one step before the java execution ... is it possible ?

I've discovered another strange behaviour, when the new request is submitted from chronoconnectivity to chronoform ( via a new record's button ) the action is "edit" and not "new" as i'm expecting to be. In this case my edit form ( the java/php inside ) does not understand if is a new record or an existing one ......
Max_admin 06 Oct, 2014
When do you want to run this AJAX call ? when the form is opened for editing ?

If yes then all actions should be in the "on load" event, and the submit event should only have the "connection action"
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
Paolo.Ferlini 06 Oct, 2014
Hi Max,
my idea is to run this AJAX code during the submit event and before returning to the chronoconnectivity list.

sorry if i'm unable to explain better.

:-)
GreyHead 06 Oct, 2014
Hi Paolo,

If you are running it in the On Submit event then you can use plain PHP in a Custom Code action, no need for Ajax or JavaScript - that will only run from the browser.

Bob
Paolo.Ferlini 07 Oct, 2014
Thanks Bob for your suggestion.

Paolo
This topic is locked and no more replies can be posted.