Custom Fields
Re-Envisioned
Support MB Frontend Submission Metabox field submission from custom admin page

  • Creator
    Topic
  • #19019
    Resolved bpdigital
    Participant

    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?

Viewing 6 replies - 1 through 6 (of 6 total)
  • Author
    Replies
  • #19027
    Long Nguyen
    Moderator

    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/

    #19028
    bpdigital
    Participant

    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.

    #19030
    Long Nguyen
    Moderator

    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 …

    #19039
    bpdigital
    Participant

    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.

    #19045
    Long Nguyen
    Moderator

    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.

    #19051
    bpdigital
    Participant

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
grid gear info copy caret-up caret-down trash