• Resolved jennifer13

    (@jennifer13)


    Hello,

    I created a form, it works but I have a problem.
    I want to retrieve this form in each multisite

    In this parent template, the shortcode works, the form is displayed.
    [hf_form slug="test-form"]
    but in the multisite template, file the shortcode does not work
    Error: No form found with slug test-form

    I managed to retrieve the parent’s form

    switch_to_blog(get_blog_details()->site_id);
    $form = do_shortcode('[hf_form slug="test-form"]');
    restore_current_blog();

    The form is displayed on the multisite side. The problem is that my action of the form is not good.I want to redirect to the parent’s url

    parent url : POST https://website.local/wp/wp-admin/admin-ajax.php?action=hf_form_submit

    multisite url : POST : https://test.website.local/wp/wp-admin/admin-ajax.php?action=hf_form_submit

    Do you have the possibility to modify the action of the form?

    <form action="TODO" method="post" class="form-example">

    Thanks for your help
    Best regards

    • This topic was modified 3 years, 9 months ago by jennifer13.
Viewing 2 replies - 1 through 2 (of 2 total)
  • By design the HTML forms plugin will have separated forms and settings per website. So you will need to create a copy of the form in each site for it to work and it’s currently not possible to manage 1 form from a parent site that can be used on all the sites.

    Hope that helps. If you have any questions, please let me know!

    Thread Starter jennifer13

    (@jennifer13)

    OK, thank you for your quick reply!

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘same form multisites’ is closed to new replies.