I was wondering, is it possible to embed a front end form inside a iframe? so i can display the form on a subdomain oage? or will i need to create this functionality myself? i basically want to output the form externally but on the same domain name.
Yes, it is possible to embed a frontend form in an iframe tag. You can also refer to this documentation for more information https://docs.metabox.io/extensions/mb-frontend-submission/#embedding-forms-on-other-sites-via-iframe
Ok thanks. There is no example of the iframe element so i assume that the form has to be outputted on a webpage and embed the whole webpage inside the iframe?
Is there a way just to output the form only inside a iframe with required css/js?
iframe tag is used to embed the HTML document to display the content on a page. I do not see a way to embed a shortcode only with this tag. Or you can try to create a blank page with the frontend form only.
Please read more on the documentation https://developer.mozilla.org/en-US/docs/Web/HTML/Element/iframe
sorry i think i did not explain myself clearly. I do not understand this guide https://docs.metabox.io/extensions/mb-frontend-submission/#embedding-forms-on-other-sites-via-iframe as i thought there would be an example of a iframe tag pointing to a page with an embedded form?
I thought about creating a blank page with the front end form, but if i try to include the shortcode in a php file it renders the form but with no js/css.
require_once( '../../../../../../wp-load.php' ); echo do_shortcode('[mb_frontend_form id="dc-product-comments" submit_button="Submit" ajax="true"]');
Or event if I create a hidden wordpress page and include the front end form shortcode then i end up outputting header/footer content too, which i do not want.
Most scripts (CSS, JS) in a theme or a plugin are registered by the function wp_enqueue_script() and they are loaded in the header or footer of the page. So if you remove the header or footer, the script files could not be loaded.
I think you can try to use the CSS code to hide the header and footer instead of excluding them from loading.
ok thanks, i have managed to sort it out with CSS to hide it.