front end submission dashboard with custom post type
Support › MB Frontend Submission › front end submission dashboard with custom post typeResolved
- This topic has 42 replies, 6 voices, and was last updated 3 years, 11 months ago by
Patrick Nelson.
-
AuthorPosts
-
May 4, 2021 at 9:26 AM #27875
Long Nguyen
ModeratorHi Patrick,
The post type attribute should be added in the shortcode frontend submit to make the dashboard works.
[mb_frontend_form post_fields="title,content" post_type="speaker-profile"]
Get more details here https://docs.metabox.io/extensions/mb-frontend-submission/#creating-post-forms
May 4, 2021 at 3:12 PM #27886Patrick Nelson
ParticipantHi Long,
This is exactly what I did (please read my previous posts in this thread) and it doesn't work.
I have tried single quotes, double quotes, disabled all other plugins and changed theme to Twenty Twenty One. It simply doesn't work. Even if I change the post_type to page, it still shows the default post type.
May 4, 2021 at 6:33 PM #27897Long Nguyen
ModeratorHi Patrick,
Can you please share the screenshots of two pages?
- The page ID 1819 has the shortcode frontend submit
[mb_frontend_form post_fields="title,content" post_type="speaker-profile"]
- The page has the shortcode frontend dashboard
[mb_frontend_dashboard edit_page="1819"]
May 4, 2021 at 6:54 PM #27898Patrick Nelson
ParticipantSure.
This is 1819 which has the submit form - https://prnt.sc/12h3hm5
Content is shortcode[mb_frontend_form id="speaker-profile"]
This is 1863 which has the dashboard - https://prnt.sc/12h3k1g
Content is shortcode[mb_frontend_dashboard edit_page="1819" post_type="speaker-profile"]
I'm happy to supply login details if I can do so securely.
May 5, 2021 at 8:55 AM #27917Long Nguyen
ModeratorHi Patrick,
Frontend Submit shortcode attributes:
id
: is the meta box ID, if you do not assign a meta box ID to this post type, please remove it.
post_type
: is the slug of your post typespeaker-profile
or you can change topage
. You have to add this setting if you want to make the shortcode Frontend Dashboard edit this post type.[mb_frontend_form post_fields="title,content" post_type="speaker-profile"]
Please read more on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/
May 5, 2021 at 2:33 PM #27929Patrick Nelson
ParticipantPage ID 1819 works fine - it always has. What doesn't work - and still doesn't work - is Page ID 1863 from above that should show a User Posts Dashboard for a CPT called speaker-profile. No matter what I change the attribute 'post_type' to, the dashboard only ever shows the default 'post'.
Long, I provided the information you asked for and your response:
("post_type: is the slug of your post type speaker-profile or you can change to page. You have to add this setting if you want to make the shortcode Frontend Dashboard edit this post type.")
suggests that you are not even reading what I am writing. Once again, I have added the setting 'post_type' and I have set the slug to speaker-profile. All of this is clear from my most recent comment. It doesn't work! Can you not see what I have written in my previous comment?
May 5, 2021 at 2:50 PM #27930Patrick Nelson
ParticipantLook, I have just applied a number of other attributes to the shortcode as you can see here: https://prnt.sc/12ijlnh
And, as you can see here, those attributes all work: https://prnt.sc/12ijmcd
The dashboard has changed - only the title column, renamed to "Speaker", the welcome message has gone and the add new button now reads 'Add new speaker'.
All of these attributes work. Every one EXCEPT the post_type attribute which I have entered correctly as you can see from this screenshot of the MetaBox Edit Post Type screen: https://prnt.sc/12ijrnm
I don't know what else I can do to demonstrate that the attribute 'post_type' does not work correctly.
I subscribe to the Developer Bundle of MetaBox and I am considering cancelling this. Not because of the technical problem but because of the support problem.
May 5, 2021 at 3:45 PM #27935Long Nguyen
ModeratorHi Patrick,
I'm sorry about this situation. But can you please make sure that the
post_type
attribute is added to the shortcode frontend submit?[mb_frontend_form post_fields="title,content" post_type="speaker-profile"]
I see that in your reply, the value
speaker-profile
is assigned to the attributeid
, not the attributepost_type
[mb_frontend_form id="speaker-profile"]
If it still does not work, please share your site credentials via this contact form https://metabox.io/contact/, I will help you to check it.
May 5, 2021 at 5:08 PM #27938Patrick Nelson
ParticipantHow are you "seeing" that in my reply?
My screenshot at https://prnt.sc/12ijlnh clearly shows the shortcode is mb_frontend_dashboard not mb_frontend_form.
The screenshot also shows that the value
speaker-profile
is assigned to the attributepost-type
not the attributeid
.May 5, 2021 at 5:19 PM #27939Long Nguyen
ModeratorHi,
Please check my two replies: #27897 and #27917.
You have to add the attribute
post_type
to the shortcode Frontend Form mb_frontend_form if you want to make the shortcode Frontend Dashboard edit the post typespeaker-profile
.On the page 1819:
[mb_frontend_form post_fields="title,content" post_type="speaker-profile"]
On the page 1863:
[mb_frontend_dashboard edit_page="1819"]
May 5, 2021 at 6:26 PM #27942Patrick Nelson
ParticipantOK, thank you Long. That now works and I now understand.
However, I notice that these forms do not respect editing or posting capabilities. I have a user who should not be able to add, publish or delete this CPT but the Add New button and the delete Action are freely available which means the user can carry out actions that they should be denied.
I appreciate the help getting this working but this does render the functionality useless for us.
May 6, 2021 at 6:14 AM #27950Long Nguyen
ModeratorHi Patrick,
Thank you for your feedback.
The frontend dashboard allows the users to edit their posts on the frontend. If you do not want to allow editing posts for some specific users, please don't give them access to this page. This plugin might help you to do that https://wordpress.org/plugins/restrict-user-access/.
May 6, 2021 at 6:05 PM #27964Patrick Nelson
ParticipantThat's not the issue, Long.
We're using PublishPress permissions to set custom capabilities for CPTs for custom user roles. So we have a role called Speaker who can edit a Speaker post that is assigned to them (they are the author) but they don't have permission to create a new Speaker post or to delete any post.
These permissions are recognised and obeyed by WordPress. So in the backend admin screen, for example, they don't see the Add New option for Speaker posts and they don't have an option to delete their assigned post.
However, your frontend dashboard has an 'Add new' button and a 'delete' action. Both of these allow the user to bypass these permissions and create new posts or delete their assigned posts.
- The page ID 1819 has the shortcode frontend submit
-
AuthorPosts
- You must be logged in to reply to this topic.