Forum Replies Created
-
AuthorPosts
-
September 28, 2022 at 10:48 PM in reply to: ✅Please provide example for custom sanitization of nested subgroup fields #38463
Long Nguyen
ModeratorHi,
If you want to sanitize a custom field in a subgroup, for example
sub_text1, please change the code to this oneif( !empty( $sub_group ) ){ $value['sub_group']['sub_text1'] = wp_kses_post( $sub_group['sub_text1'] ); }$value['sub_group']is not a string to sanitize so the error message will appear. Please read more on the documentation https://developer.wordpress.org/reference/functions/wp_kses/
https://developer.wordpress.org/reference/functions/wp_kses_post/September 28, 2022 at 10:33 PM in reply to: ✅How to display attachments of CPT in Admin Edit Screen #38461Long Nguyen
ModeratorHi Joe,
Can you please let me know what the current field store images is? How do you store the images in the post?
September 28, 2022 at 10:28 PM in reply to: Problem unresolved, wooc orders custom field and relationnal #38459Long Nguyen
ModeratorHi,
I've tried to use the WooCommerce filter hook to modify the post type shop_order but no luck. I've also asked our development team to take a look at this case and will get back to you if I have any information.
September 28, 2022 at 10:22 PM in reply to: ✅show certain fields based on restrict content pro user roles #38458Long Nguyen
ModeratorHi Paul,
Currently, MB Conditional Logic does not support showing/hiding a field based on the user role. You can use the extension MB Include Exclude to show/hide a meta box (field group) based on the user role. And add more meta box IDs to a frontend form as well.
Please read more on the documentation https://docs.metabox.io/extensions/meta-box-include-exclude/
https://docs.metabox.io/extensions/mb-frontend-submission/#how-to-add-more-field-groups-meta-boxes-to-the-frontend-submission-formSeptember 28, 2022 at 3:32 PM in reply to: Second validation message with rwmb_frontend_after_display_confirmation #38452Long Nguyen
ModeratorHi,
There is no form hook or post hook that supports this case. I think you can use the hook
rwmb_frontend_after_processand create some JS code to append the HTML code to the form after processing.
https://docs.metabox.io/extensions/mb-frontend-submission/#form-hooksGood luck.
Long Nguyen
ModeratorHi,
I'm not sure why the helper shortcode or helper function
rwmb_meta()is not able to display the translation strings in other languages on your site. I've informed the development team to take a look at this case.
Meanwhile, you can create your own shortcode to display the field value and use the WordPress functionget_option()then add the shortcode to the Kadence block, just like the helper shortcode[rwmb_meta]. Please read more on the documentation https://codex.wordpress.org/Shortcode_APISeptember 28, 2022 at 10:50 AM in reply to: Cloneable Fields - Unique ID or Class for each group (or each field in each grp. #38449Long Nguyen
ModeratorHi,
Currently, this feature is not supported for the subfields in a cloneable group. You can try to use the selector following this format
group_id[index][field_id]to select the subfield by input name. The index starts from 0, like array keys.September 28, 2022 at 10:30 AM in reply to: ✅Custom Field PHP Code: Text Domain and Function Name #38448Long Nguyen
ModeratorHi Fergal,
- Each function must have a unique name, you can type any name as you want. It should be related to the CPT or your purpose ...
- The text domain should be the theme or plugin text domain. Some strings like field names can be translated to other languages. Please read more on the WordPress documentation https://developer.wordpress.org/themes/functionality/internationalization/#text-domainSeptember 28, 2022 at 10:26 AM in reply to: ✅Custom field only appears after unchecking/rechecking in Screen Options #38447Long Nguyen
ModeratorHi Dan,
Can you please share the code that creates the field group (meta box) on your site? It is possible that the meta box and custom field are hidden by default by enabling the setting
default_hidden. Read more on the documentation https://docs.metabox.io/creating-fields-with-code/#field-group-settings
https://docs.metabox.io/extensions/meta-box-builder/#getting-php-codeLong Nguyen
ModeratorHi,
If the dot (.) notation works on your site, please type the field ID manually. You can also share the admin site account to this contact form https://metabox.io/contact/
I will help you to check the issue.September 27, 2022 at 11:24 PM in reply to: ✅Please provide example for custom sanitization of nested subgroup fields #38442Long Nguyen
ModeratorHi,
Please follow this documentation to know how to create a sanitization callback for a subfield in a group, the sub-subfield in a subgroup will work like that https://docs.metabox.io/sanitization/#sanitizing-subfields-in-a-group
Long Nguyen
ModeratorHi Cynthia,
If you want to hide a relationship metabox based on a field value, please follow this documentation to know how to use conditional logic to show/hide an element https://docs.metabox.io/extensions/meta-box-conditional-logic/#using-outside-meta-boxes
Long Nguyen
ModeratorHi Cynthia,
In the Relationships builder, you can click on the Field tab to add the query args, see this screenshot https://monosnap.com/file/5uXLv1wFUsfatPChG15ahpfDiaUDBG
and refer to this documentation https://docs.metabox.io/extensions/meta-box-builder/#dot-notationLong Nguyen
ModeratorOk, let me know if you need anything further.
September 27, 2022 at 10:38 PM in reply to: "Post field" doesn't work after update (custom fields of settings page) #38438Long Nguyen
ModeratorHi,
Please share your site credentials (or staging site) via this contact form https://metabox.io/contact/, I will take a closer look.
-
AuthorPosts