Support Forum
Support › MB Frontend Submission › User Dashboard displaying the right form
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
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.
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
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;
} );
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']
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.