Support Forum
Support › MB Frontend Submission › Undefined array errors
I am using Bricks and the MB front end submission form.I do not want the content or title included, but when I remove them, this error shows on the front end.
I am using Bitform as my primary form since it looks better and can use multistep, but I need to keep MB Front End Submission solely for the map field.
From videos I've watched, it allows others to remove title/content with no issue, so why is this happening when I do it?
Warning
: Undefined array key "label_title" in
/home/xxxxxxx/public_html/xxxxx-staging.onrocket.site/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-frontend-submission/src/Bricks/SubmissionForm.php
on line
254
Warning
: Undefined array key "label_content" in
/home/xxxxxxx/public_html/xxxxxx-staging.onrocket.site/wp-content/plugins/meta-box-aio/vendor/meta-box/mb-frontend-submission/src/Bricks/SubmissionForm.php
on line
255
Anyone?
Hello Tanja,
Thank you for your feedback.
I've escalated this issue to the development team to check the warning message when using the Bricks element and frontend form. Meanwhile, you can try to use the frontend form shortcode and remove the title, content from post_fields
attribute. Following the documentation
https://docs.metabox.io/extensions/mb-frontend-submission/#adding-the-submission-form
I just started over and tried two different ways of creating a form and neither are working. First, I created a form with shortcodes, and second, I used the MB Front End Submission element in Bricks.
Shortcode version:
I tried to create the illusion of a multistep form and adding shortcode from my custom fields into tabs in Bricks. For example:
Tab 1: [mb_frontend_form id='listing-type,location,business-hours-display' post_fields='title,content']
Tab 2: [mb_frontend_form id='listing-packages']
I hid the submit button with code except for the last step. I realized hiding the button on each page might end up with only the data from the last tab with the submit button showing up, but,in fact, the entire post was empty.
MB Front End Submission element in Bricks
When I test this out, it gives me a notice that the form is successfully submitted, but there is no record of it on the back end.
Additional questions:
I've seen this asked before but it hasn't fully answered what I'm looking for. How exactly can post drafts be saved via front end submission? I only see submit buttons.
I'm trying to break up the form since it requires the selection of packages to purchase listings. If they select a paid listing, a pop up form will appear for payment. I'd like users to be able to save a draft of their post if they pay and don't want to complete the rest of it right away.
Thanks.
Hello,
So if you use the frontend submission shortcode, does the warning message Warning : Undefined array key "label_title" in ...
still display?
Regarding the post draft, it is the post status. The post will be saved to the status (draft, publish, private ...) which is set by the shortcode attribute post_status
. Please follow the documentation to get more details https://docs.metabox.io/extensions/mb-frontend-submission/#adding-the-submission-form