• Resolved wpsana

    (@wpsana)


    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

    (@wpmudev-support2)

    Hello @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/

    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/, if you need further advice about it, feel free to email [email protected].

    Subject: ATTN: WPMU DEV support – wp.org”

    Kind Regards,
    Amin

    Thread Starter wpsana

    (@wpsana)

    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 Laura – WPMU DEV Support

    (@wpmudevsupport3)

    Hi @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/, and feel free to email us at [email protected] if you need further advice about it.

    Best regards,
    Laura

    Plugin Support Patrick – WPMU DEV Support

    (@wpmudevsupport12)

    Hi @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)
  • You must be logged in to reply to this topic.