Forum Replies Created
-
AuthorPosts
-
April 15, 2021 at 5:04 PM in reply to: ✅How to Autofill the Title of the cutstom post with the value of the 2 fields #27271
Ulysse
ParticipantHello,
I have created this snippet (I don't want to change my function.php) with code snippet:
my metabox is fields-for-agent
add_action( 'rwmb_fields-for-agent_after_save_post', 'update_post_title' ); function update_post_title( $post_id ) { // Get the field value $t1 = rwmb_meta( 'first_name', '', $post_id ); $t2 = rwmb_meta( 'last_name', '', $post_id ); // Get the post title $my_post_title = get_the_title( $post_id ); // Preprare update post $my_post = array( 'ID' => $post_id, 'post_title' => $t1 . ' ' . $t2, 'post_name' => $t1 . '_' . $t2, ); wp_update_post( $my_post ); }But it does not work and I don't find why.
Maybe because the field "post_title" is in the metabox?
Ulysse
ParticipantOK. Thank you. I'll try to find a plugin to manage this.
Ulysse
ParticipantThank you. It's what I was looking for.
Ulysse
ParticipantIn fact, the status is well set for a new post, but when the use edits a published post, the status is not changed to "pending". It stays "published".
Is there a way to change that?Ulysse
ParticipantOK. I did it.
By the way, I think there is a conflict on the css with elementor.
If I use elementor on my page to display the dashboard, it's not well displayed. If I don't use elementor, it's well displayed.
Have a look at the screenshot:
Page edited with elementor: https://prnt.sc/11as6mf
Page edited without elementor: https://prnt.sc/11as40dApril 12, 2021 at 11:33 PM in reply to: ✅front end submission dashboard with custom post type #27189Ulysse
ParticipantThank you. It works. Everything is now in double quote.
For your info, the shortcode given by the plugin uses simple quotes: [mb_frontend_form id='fields-for-agent' post_fields='title,content']
Here is a screenshot: https://prnt.sc/11apzkd
So it's very confusing.
April 12, 2021 at 10:54 PM in reply to: ✅How to Autofill the Title of the cutstom post with the value of the 2 fields #27188Ulysse
ParticipantHonnestly, as A build my custom fields with the BM builder, I don't see how to manage the code.
Can I add the code to the function.php your provided and keep the BM Builder?
(I don't want to put everything in the function.php. I want to keep the flexibility/ease of use of the MB builder).(sorry to be rooky in that domain).
Ulysse
ParticipantThank you very much. I use a very basic them, hello theme, to avoid any compatibility issue. So it should work.
I'll try.Ulysse
ParticipantHello,
I have exactly the same issue.Everything is well setup on website and the shortcode does not display the cutom post. Only the default post.
I use the shortcode like that:
[mb_frontend_dashboard edit_page="190" post_type="agent"]
with page id=190, the page where I have the form [mb_frontend_form id='fields-for-agent' ]
and post_type is "agent".I have deactivated all my plugins (I have very few), my theme is very basic (hello theme). I use elementor and elementor pro. I tried to deactivate them and still get the same issue.
I don't know what to do.
Ulysse
ParticipantThank you very much. It's easy and it works very well.
You might add a word about this in the documentation (unless it is and didn't see it).Ulysse
ParticipantThank you, it would be great.
Meanwhile, is there a way to hide it with custom css?April 12, 2021 at 2:35 PM in reply to: ✅How to Autofill the Title of the cutstom post with the value of the 2 fields #27172Ulysse
ParticipantHello,
I use the MB builder.
Your tuto does not use it.
Is there a solution with the MB builder?Ulysse
ParticipantFinally it works.
In fact in your documentation, you say several times that if we don't specify the "id", the default profile is displayed, but it's not."
Go to the Page menu > Add New to create a new page and name it is Register Page. In the content section of the page, insert this shortcode:
mb_user_profile_register label_submit="Register" confirmation="Your account has been created successfully!"
id Meta Box ID(s), separated by commas. All fields from meta boxes will be included in the registration form. If not specified, it shows the default registration form.
- To change the password in frontend, it's the same.
SHOW THE PASSWORD FIELDS
The Password field is created automatically by MB User Profile with ID is rwmb-user-info. Just insert it to the above shortcode.However, as the user’s routine and my opinion, we should make an individual page for these fields. It is where users can change the password as well.
So, I create a new page named Change Password and use the same shortcode with the User Profile page.
mb_user_profile_info id="rwmb-user-info" label_submit="Save Changes" confirmation="Your password was changed successfully!"
It does not work. We have to create the metabox.
Ulysse
ParticipantThank you.
Indeed, I contacted them and they have a shortcode to pull the meta from the custom post: {embed_post.meta.email_agent}So, as a feedback, fluent form pro ca pull your meta and they have shortcodes which work in their form.
Best regards.
Ulysse
ParticipantI did.
Have a look at my test page: https://prnt.sc/1192him -
AuthorPosts