Support Forum
Support › MB Frontend Submission › Hide Title column from front end submission
I only want the user to be able to edit and update the form on the front end - no need to see the actual post - is there a way to hide the Title column and the posts - but leave the date and edit buttons etc
regards
Paul
Also - how can I limit the user to jut one post - I only want them to be able to add i post which they cab=n edit any time - as it will be a long form that they fill out and keep up to date.
I'm not very good with code so please be kind with your answers
thank you
Hi Paul,
You can use the attribute columns to remove the column title from the frontend dashboard. For example
[mb_frontend_dashboard edit_page="6" columns="date,status"]
Read more on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#user-posts-dashboard
If you are not familiar with coding, you can use a third-party plugin to limit posts per user.
https://wordpress.org/plugins/user-posts-limit/
Thank you - I have sorted the issues above - I'm having trouble with the redirect - I have seen the code below - but not sure if I need to change anything to get it to work and also where I implement it - I have tried adding the code using a code snippets plugin to run everywhere - but it didn't seem to work.
Also - is it possible to alter the text Howdie on the title - would like to say "Welcome" instead
add_filter( 'rwmb_frontend_redirect', function( $redirect, $config ) {
// Make sure you work on the correct form.
if ( 'my-id' !== $config['id'] ) {
return $redirect;
}
// Get submitted data via $_POST.
$value = empty( $_POST['field_id'] ) ? null : $_POST['field_id'];
if ( 'yes' === $value ) {
$redirect = 'https://yourdomain.com/custom-page/';
}
return $redirect;
}, 10, 2 );
Hi,
You can use this filter code to change the welcome message
add_filter( 'mbfs_welcome_message', function( $message, $user, $query ) {
$message = '<h3>'. esc_html( sprintf( __( 'Hello, %s!', 'mb-frontend-submission' ), $user->display_name ) ).'</h3>';
$message .= '<p>'. esc_html( sprintf( __( 'You have %d %s.', 'mb-frontend-submission' ), $query->post_count, strtolower( $query->query['post_type'] ) ) ).'</p>';
return $message;
}, 10, 3 );
Regarding the redirect code above, you need to replace my-id
and field_id
with your meta box ID, field ID to make it works.
thank you for all your patience with me.
can you just let me know where I get the info for the following.
Regarding the redirect code above, you need to replace my-id and field_id with your meta box ID, field ID to make it works.
I have this shortcode for the form - where do I find the 2 IDs
[mb_frontend_form id='garden-form' post_fields='title,content']
sorry for my lack of knowledge on this topic - this is all new to me
kind regards
Paul
Hi,
You can add those code blocks to the file functions.php in the theme/child theme folder to implement them. You can see the details in this screen record https://www.loom.com/share/f6cf8db0ab7a4aef8218ce03fcc34b6e
thank you for your help again - I don't want it to redirect if a value is matched - I just want it to go to a different page once it has been submitted - so after post go to /newpage/
thanks again
Hi,
You can use the attribute redirect
to redirect to the newpage
after the post is submitted successfully.
[mb_frontend_form id='garden-form' post_fields='title,content' redirect='http://your-site.com/newpage']
Get more details about the attributes here https://docs.metabox.io/extensions/mb-frontend-submission/#shortcode-attributes