same form multisites
-
Hello,
I created a form, it works but I have a problem.
I want to retrieve this form in each multisiteIn 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-formI 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
- The topic ‘same form multisites’ is closed to new replies.