Support Forum
Support › MB Frontend Submission › Metabox field submission from custom admin pageResolved
Hello,
I am trying to create a user experience where the user will enter basic details about their business / website into a multi-step form in the admin panel.
Within this form I would like to query the user for data that would be stored in a custom field of a custom post type or settings page. To achieve this I intended to use the shortcode included with MB Frontend Submission, but found that the shortcode is NOT executed within the admin panel.
Essentially, I would like to embed these forms within my wizard and have that data stored to a new post or to the settings page (whichever is appropriate to achieve this workflow)
Any suggestion on how we can achieve this experience?
Hi there,
The extension MB Frontend Submission helps you to create a form which let user can submit their post on the frontend. You can create a meta box with the fields business, website ... and show the form on the frontend with the shortcode
[mb_frontend_form id="meta-box-id" post_fields="title,content"]
then the user can submit their post include the business, website and post data.
For more information, please follow our documentation
https://docs.metabox.io/extensions/mb-frontend-submission/
Hi, thank you, but that is not my intended functionality. If I cannot use this extension specifically for what I an trying to achieve, is there another solution?
Again, the intention is to have these metabox fields present in a multi step form. After further research I think we'll be entering the data into a settings page.
Is there any way to get the Meta Box fields to display within our form rather than the settings page? I need the user to enter this information within the flow we give them.
This form is for the website OWNER not a user.
Hi,
The Meta Box plugin only supports to create the fields for the posts, pages, CPT, user, and the settings page which is created by MB Settings Page extension. You are right when creating the Settings page, this is the better way to let the owner import their information just like the Site title, logo ...
Alright, according to my understanding, you are saying there is NO WAY that you are aware of to input data into a metabox settings page unless you are ON the settings page itself?
Is there any way I can make a form and use some custom function to enter data into those fields from my custom page?
Do you have any documentation or code snippets that would serve as a guide on where to begin?
Again, just to clarify, the user is entering this data on a custom multi-step form WITHIN the admin panel. This is REQUIRED for my user flow. During the step on this form, I need to have them enter data that will be SAVED into the metabox settings page fields (obviously, the user will enter this data on the form, before they have ever reached the settings page)
If it helps to undertand the flow, the URL would be:
https://exampleurl.com/wp-admin/admin.php?page=site_setup&step=site-data
thank you again for your help.
Hi,
I'm following this documentation to create a settings page name "Pencil" and a field "Heading Color". The settings page is saved in wp_options
table so when you click update/submit your custom form, you can trigger this code to update the option (field value) in the settings page
add_action( 'admin_init', function() {
$option = get_option( 'pencil' );
$option['heading-color'] = '#fff';
update_option('pencil', $option);
} );
Hope that matches your idea.
Thank you for pointing us in the right direction!
We were able to achieve our goal with this code as a guide. 🙂
Very much appreciated.