Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi Marius,
I'm not able to reproduce the issue on my local site. I will ask our development team about this case and get back to you later.
July 21, 2022 at 12:46 PM in reply to: How do I Manually (via PHP) set values for a Checkbox List...? #37099Long Nguyen
ModeratorHi,
The action hook
rwmb_before_save_postsupport passing the object ID (post ID) to the function inside. You can use it in your codeadd_action( 'rwmb_event-details_before_save_post', function( $post_id ) { add_post_meta( $post_id, 'checkbox_list_id', 'value1', false ); } );Read more on the documentation
https://docs.metabox.io/actions/rwmb-before-save-post/Long Nguyen
ModeratorHi,
Currently, it is not possible to add a function to query_args settings in the builder. Please use the code to register the custom fields in this case to assign a parameter to a function that returns a value.
July 21, 2022 at 12:22 PM in reply to: ✅FacetWP does not understand MetaBox Google Maps field #37096Long Nguyen
ModeratorHi,
By default, the data of the map fields (Google Map or OSM) is saved to the database in the following format
latitude,longitude,zoom. If you want only to use the latitude and longitude, please follow this documentation https://docs.metabox.io/fields/map/#getting-field-value.Or use the action
rwmb_after_save_fieldto re-update the field map value with onlylatitude,longitude. Follow this documentation https://docs.metabox.io/actions/rwmb-after-save-field/Long Nguyen
ModeratorHi.
It might be a typo issue on your testing code. The code works as well on my site, screen record https://imgur.com/a/3VxLe0l
Long Nguyen
ModeratorHi,
Please follow this documentation to know how to bypass the sanitization of the field https://docs.metabox.io/sanitization/
July 20, 2022 at 10:30 PM in reply to: Custom fields ( Advanced) Before and after HTML in MB views #37086Long Nguyen
ModeratorHi Joe,
The setting
beforeandafterare parts of field appearance. It works like the description of the field when adding value to the field. And it's not a part of the field value to save to the database.If you want to get these field settings, please follow this documentation https://docs.metabox.io/functions/rwmb-get-field-settings/
Long Nguyen
ModeratorHi,
You can just use the variable
vw_postidwithout the pair of curly brackets (which means output value){% set foo = vw_postid %} Post ID is {{ foo }}To learn more how to use Twig code, please follow this link https://twig.symfony.com/doc/3.x/templates.html#ides-integration
Long Nguyen
ModeratorHi Sam,
Thanks for more information.
I think the helper function
rwmb_set_meta()does not work in this case because the fieldimage_uploadsave meta values (field value) to the database in multiple rows with the same meta key (field ID). Read more here https://docs.metabox.io/fields/image-upload/#dataSo you can try to use the WordPress function
add_post_meta()with the last parameter set tofalseto update this field value for a post. I will inform the development team to support this case in the next update.
https://developer.wordpress.org/reference/functions/add_post_meta/July 20, 2022 at 9:34 PM in reply to: Default value (std) doesn't work if field ID is post_title or post_content #37083Long Nguyen
ModeratorHi,
The default value for the post title field is removed. Please use the setting
placeholderinstead ofstd, I will inform the development team to consider supporting this case in future updates.July 20, 2022 at 12:36 PM in reply to: How do I Manually (via PHP) set values for a Checkbox List...? #37079Long Nguyen
ModeratorHi,
You can use the WordPress function
add_post_meta()with the last parameter set tofalse. For example:add_post_meta( 123, 'checkbox_list_vk9atamt05c', 'value1', false );where 123 is the post ID. Read more on the documentation
https://developer.wordpress.org/reference/functions/add_post_meta/
https://docs.metabox.io/fields/checkbox-list/#dataJuly 20, 2022 at 10:22 AM in reply to: ✅Update - Combine Custom Post With Details from another Post Type #37078Long Nguyen
ModeratorHi,
Thanks for reaching out.
It is beyond the scope of support of Meta Box to do these steps with a few clicks. It is possible but needs a lot of custom code to update the field value and data of a post to another. For more information, you can follow the documentation to use the form hooks https://docs.metabox.io/extensions/mb-frontend-submission/#hooks-1
and refer to this topic https://support.metabox.io/topic/replace-post-publish-date-with-custom-field/#post-35515If you are not familiar with coding, you can create a customization service request, follow the support policy https://support.metabox.io/topic/support-policy/
Long Nguyen
ModeratorHi Kyle,
If you don't want to share your data in a public forum, please share the screen record and your site credentials via this contact form https://metabox.io/contact/. I will help you to check the issue.
Long Nguyen
ModeratorHi John,
You can use the attribute
roleto set the default role for the registered users. Read more on the documentation https://docs.metabox.io/extensions/mb-user-profile/#registration-form[mb_user_profile_register id="meta-box-id" role="test-role"]Long Nguyen
ModeratorHi,
You can use the filter hook
rwmb_normalize_fieldto unset or customize a field on the backend/frontendRead more on the documentation https://docs.metabox.io/filters/rwmb-normalize-field/ and refer to the topic https://support.metabox.io/topic/changing-the-field-type-on-frontend/
https://support.metabox.io/topic/make-only-specific-fields-editable-in-frontend -
AuthorPosts