Title: communicate forminator hook with javascript
Last modified: October 8, 2024

---

# communicate forminator hook with javascript

 *  Resolved [wpsana](https://wordpress.org/support/users/wpsana/)
 * (@wpsana)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/communicate-forminator-hook-with-javascript/)
 * Hello,
 * I use forminator hook to customize my form submission like
 * add_action(‘forminator_custom_form_submit_before_set_fields’, ‘handle_upload_file’,
   10, 3);
 * function handle_upload_file($entry, $form_id, $form_data_array) {
   // here I want
   to communicate client side to open swal popup
 * // i do some traitements
 * // I send the progress information to my popup
 * // i continue my traitement
 * // I send the progress information
 * // i continue the last step
 * // i ask to close popup_}
 * How can I communicate javascript with my hook
 * Best regards,
 * Sana

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Support [Amin – WPMU DEV Support](https://wordpress.org/support/users/wpmudev-support2/)
 * (@wpmudev-support2)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/communicate-forminator-hook-with-javascript/#post-18060589)
 * Hello [@wpsana](https://wordpress.org/support/users/wpsana/)
 * I hope you are doing well today.
 * I’m afraid communication between PHP and Javascript is much more complex than
   adding Javascript code inside the PHP hook, the standard solution is to create
   an Ajax function that can receive calls from a Javascript code (client-side code)
   in real-time.
 * You can find more information about how to use Ajax in this article:
    [https://wpwebinfotech.com/blog/how-to-use-ajax-in-wordpress/](https://wpwebinfotech.com/blog/how-to-use-ajax-in-wordpress/)
 * It’s a complex setup and unfortunately out of the scope of our support. you’ll
   need to hire a developer to provide the required custom code for you. WordPress
   provides a jobs directory here [https://jobs.wordpress.net/](https://jobs.wordpress.net/),
   if you need further advice about it, feel free to email `wpsupport@incsub.com`.
 * Subject: ATTN: WPMU DEV support – wp.org”
 * Kind Regards,
    Amin
 *  Thread Starter [wpsana](https://wordpress.org/support/users/wpsana/)
 * (@wpsana)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/communicate-forminator-hook-with-javascript/#post-18061801)
 * Hello Amin,
 * Thanks for your response.
 * Is it possible to handle loading action, for example, I change the loading text
   every new steps in my handle_upload_file method ?
 * Thanks for your time,
 * Sana
 *  Plugin Support [Williams – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport3/)
 * (@wpmudevsupport3)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/communicate-forminator-hook-with-javascript/#post-18062019)
 * Hi [@wpsana](https://wordpress.org/support/users/wpsana/)
 * Hope this message finds you well.
 * This will also require a custom code, as explained by Amin this is out of our
   support scope, you can visit [https://jobs.wordpress.net/](https://jobs.wordpress.net/),
   and feel free to email us at [wpsupport@incsub.com](https://wordpress.org/support/topic/communicate-forminator-hook-with-javascript/wpsupport@incsub.com?output_format=md)
   if you need further advice about it.
 * Best regards,
    Laura
 *  Plugin Support [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * (@wpmudevsupport12)
 * [1 year, 5 months ago](https://wordpress.org/support/topic/communicate-forminator-hook-with-javascript/#post-18081269)
 * Hi [@wpsana](https://wordpress.org/support/users/wpsana/)
 * We haven’t heard from you in a while, I’ll go and mark this thread as resolved.
   If you have any additional questions or require further help, please let us know!
 * Best Regards
    Patrick Freitas

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘communicate forminator hook with javascript’ is closed to new replies.

 * ![](https://ps.w.org/forminator/assets/icon-256x256.gif?rev=3443182)
 * [Forminator Forms – Contact Form, Payment Form & Custom Form Builder](https://wordpress.org/plugins/forminator/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/forminator/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/forminator/)
 * [Active Topics](https://wordpress.org/support/plugin/forminator/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/forminator/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/forminator/reviews/)

 * 4 replies
 * 4 participants
 * Last reply from: [Patrick – WPMU DEV Support](https://wordpress.org/support/users/wpmudevsupport12/)
 * Last activity: [1 year, 5 months ago](https://wordpress.org/support/topic/communicate-forminator-hook-with-javascript/#post-18081269)
 * Status: resolved