User Dashboard displaying the right form

Support MB Frontend Submission User Dashboard displaying the right form

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #40534
    hello@twosixmedia.co.uk[email protected]
    Participant

    Hi I have a bit of a complicated set in that I have 2 post types a site and a sub-site -

    for this I need 2 forms one for each post type - I have got the correct form to display according the the membership level -

    and when they fill in the form the new post gets created - but then it sends them to their user dashboard and if they are the main site it shows the correct form to edit - but if they are a sub-site it says 0 sites.

    How do I show the correct user dashboard for each form?

    thanks Paul

    #40541
    PeterPeter
    Moderator

    Hello,

    You can create 2 separate pages for 2 frontend submit forms. Then create 2 different pages for 2 user dashboards. Read more on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#user-dashboard

    Let me know how it goes.

    #40550
    hello@twosixmedia.co.uk[email protected]
    Participant

    Thanks that could work - but know have another issue

    I have 2 forms on separate pages now and the title of the form needs changing - you gave me this code below
    <div> add_filter( 'rwmb_frontend_post_title', function( $field ) {
    if ( is_page( "Green Care Form" ) ) {
    $field['required'] = true;
    $field['name'] = 'Name of Green Care organisation';
    return $field;
    }
    } ); </div>

    but the other form needs it's title adding/changing as well

    I tried to add another code snippets with the following code:
    <div>
    add_filter( 'rwmb_frontend_post_title', function( $field ) {
    if ( is_page( "Green Care Sub Site Form" ) ) {
    $field['required'] = true;
    $field['name'] = 'Name of Green Care Sub Site';
    return $field;
    }
    } ); </div>

    but if I do this then the title on the first form disappears - How can I alter both form titles please

    regards
    Paul

    #40562
    PeterPeter
    Moderator

    Hello,

    Please move the return statement outside of the condition if statement and check the title again.

    add_filter( 'rwmb_frontend_post_title', function( $field ) {
    if ( is_page( "Green Care Sub Site Form" ) ) {
    $field['required'] = true;
    $field['name'] = 'Name of Green Care Sub Site';
    }
    return $field;
    } );
    #40982
    hello@twosixmedia.co.uk[email protected]
    Participant

    this all seems to be working now - but we have another issue in that the main form is duplicating posts instead of overwriting/editing the old post -

    this is the shortcode for the form:
    [mb_frontend_form id='garden-form' post_fields='title' post_type='green-care-site' redirect='http://sfgqualitymark.org.uk/user-dashboard/' submit_button='Save Your Form']

    https://sfgqualitymark.org.uk/

    #41009
    PeterPeter
    Moderator

    Hello,

    Can you please share some screenshots of the issue on your site? Please try to deactivate all plugins except Meta Box, MB extensions and switch to a standard theme of WordPress and recheck this issue.

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.