iframes
Support › MB Frontend Submission › iframes
- This topic has 5 replies, 2 voices, and was last updated 4 years ago by
Long Nguyen.
-
AuthorPosts
-
March 5, 2022 at 12:43 AM #34317
Rebecca Robertson
ParticipantHello.
I am trying to add a frontend post edit form that contains a WYSIWYG editor where the post content goes, but it is not showing the content from the post.
What am I doing wrong?
March 5, 2022 at 9:33 PM #34335Rebecca Robertson
ParticipantAlso, when adding fields that use iframe (such as single image) to the frontend or when clicking on the add media button of a frontend form, the iframe breaks the page. The content of the page disappears and the iframe content shows up under the footer of the page.
https://drive.google.com/file/d/1dYpe32iF6MNcMiYSEkwRoxK1H4RKSLU_/view?usp=sharing
You can see the add media button there above the content edit box. For some reason when you click on it though, this is what happens:
https://drive.google.com/file/d/1jSJNR4rCnwKKirlMUNgDP-l3k2CAPQ5U/view?usp=sharing
March 7, 2022 at 1:28 PM #34351Long Nguyen
ModeratorHi Becky,
You can try to remove the sanitization of the field WYSIWYG and use the field ID
post_contentto show the post content in the field area. Refer to the documentations
https://docs.metabox.io/sanitization/
https://docs.metabox.io/extensions/mb-frontend-submission/#reorder-post-fieldsMarch 15, 2022 at 8:03 PM #34524Rebecca Robertson
ParticipantThat didn't help.
This is the add image button I'm talking about. To allow authors to add a featured image to a post.
clicking on it opens the iframe in the wrong place and breaks the page. Changing the sanitize_callback has no effect on it whatsoever.March 15, 2022 at 8:09 PM #34525Rebecca Robertson
ParticipantAdditionally, where would you put the code for the reordering of post fields? In the functions file or on the page where you are calling the form?
March 16, 2022 at 8:34 AM #34537Long Nguyen
ModeratorHi Becky,
Re-order post fields mean using the custom fields with the same IDs as the default WordPress field IDs. The code would be added in the file functions.php when registering the meta box and custom fields.
Regarding the featured image issue. Can you please deactivate all plugins except Meta Box, MB extensions and switch to the standard theme of WordPress then re-check the issue?
-
AuthorPosts
- You must be logged in to reply to this topic.