Hello,
I need to add some javascript code in the success message box displayed after a form submission (ie Google Analytics and Adwords tracking)
Is there a hook for this?
I don’t want to use the avf_contact_form_submit_button_attr() because it will fire on all submissions (even if there are errors)
Thank you.
Hey Nicolas,
The JavaScript that handles from submit is in shortcodes.js starting around line 3288, you can have a look there.
Best regards,
Victoria
Hi Victoria,
Thank you for your reply, I’ve looked there but it’s not what I’m looking for.
For those facing the same needs, I’m going to modify the /framework/php/class-form-generator.php around line 263 .
Maybe you could add an hook there in a future update :)
Hi,
Thanks for the feedback. We’ll consider adding a hook for that in a future update.
Best regards,
Rikard
since 2017 you ignore it, really good work.
original:
$success .= $this->form_params['success'];
to:
$success .= apply_filters('avia_submit_sucess',$this->form_params['success']);
Would solve the complete nonesense. Please add it, provide us a way to add js oder HTML to the submit message.
Ohhh I found
‘avia_contact_form_args’ which can be used. Workaround ;)
Hey BlutVampir,
So this was solved for you?
Best regards,
Jordan Shannon