Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
Please try again with this code
// Return Select Advanced field labels $field = rwmb_get_field_settings( 'dgp_holiday_availability' ); $options = $field['options']; // Output labels foreach ($options as $key => $value) { echo $value . '<br>'; }Long Nguyen
ModeratorHi Brian,
To display the field label, you can use the function
rwmb_get_field_settings(). Please follow this documentation https://docs.metabox.io/rwmb-get-field-settings/
and this article https://metabox.io/get-field-settings/.Long Nguyen
ModeratorHi,
I've created a short video to explain the way we use to manipulate the group field value and cloneable group field value by coding because the page builder does not support to display the group/cloneable field on the frontend with its own settings.
https://www.loom.com/share/18a6eb3c369440b3b3e1d0df616d5aacYou can follow this series to get more information when working with the group field.
https://metabox.io/create-group-of-custom-fields-with-meta-box-group/
https://metabox.io/clone-group-custom-fields-using-meta-box-group/May 15, 2020 at 3:09 PM in reply to: ✅Settings Pages + Conditional Logic breaks Oxygen editor widget functionality #19620Long Nguyen
ModeratorHi,
The Oxygen page builder https://oxygenbuilder.com/ is the premium plugin, so please share a copy of this plugin with the contact form https://metabox.io/contact/. I will check this plugin on my local site and give a quick response.
May 15, 2020 at 10:03 AM in reply to: ✅Confirmation Before Delete on front end form submission? #19613Long Nguyen
ModeratorHi,
This feature is included in the latest version of MB AIO v1.11.7 or MB Frontend Submission v3.0.0. Please update the plugin Meta Box and all the extensions to check the new feature.
Long Nguyen
ModeratorHi,
Could you please update the latest version of Meta Box plugin to v5.3.0 and MB Term Meta to v1.2.9 then check the issue again?
Here is my sample code
add_filter( 'rwmb_meta_boxes', 'add_field_taxonomy' ); function add_field_taxonomy( $meta_boxes ) { $prefix = ''; $meta_boxes[] = array ( 'title' => esc_html__( 'Taxonomy field', 'text-domain' ), 'id' => 'taxonomy-field', 'fields' => array( array ( 'id' => $prefix . 'text_m0ijcp97ay', 'type' => 'text', 'name' => esc_html__( 'Text Field1', 'text-domain' ), 'required' => 1, ), ), 'taxonomies' => 'category', ); return $meta_boxes; }and it works as well on the post category settings page, see my screenshot https://cl.ly/56fc0ebfce18
May 15, 2020 at 9:25 AM in reply to: ✅Display Custom Field Types in Meta-Box Builder (missing hook) #19611Long Nguyen
ModeratorHi,
Thank you for contacting us.
At this time, we only support to register the field with the custom field type by coding
https://docs.metabox.io/custom-field-type/#using-new-field-typeI'm going to create a feature request for the developer team to support the custom field type in the MB Builder. Please keep the plugin up to date, it will be released as soon as possible.
Long Nguyen
ModeratorHi,
As I can see you are using the page builder to build the page and display the field value. The page builder can only show the normal fields, for the cloneable, group field the value returned is an array so you have to use the code with
foreachloop to iterate over the array and display the value.For more information, please follow the documentation
https://docs.metabox.io/fields/file-advanced/#template-usage
https://docs.metabox.io/extensions/meta-box-group/#getting-sub-field-valueLong Nguyen
ModeratorHi Jean,
The code to get a field from a post ID should be
$images = rwmb_meta( 'photo', array( 'limit' => 1 ), 123 );For more information, please follow the documentation
https://docs.metabox.io/rwmb-meta/#argumentsLong Nguyen
ModeratorHi,
Thank you for your reference, we've not had the plan to integrate WPGraphQL with Meta Box on the roadmap yet. But a user has created a integration plugin to use WPGraphQL and Meta Box, you can try to use his plugin to build your site.
https://github.com/hsimah/wp-graphql-metabox/To get more official resources, please follow this link
https://metabox.io/resources/Long Nguyen
ModeratorHi,
Could you please let me know the data type of column which saves
checkbox_listvalue? I’m just using typeTEXTand it saves the serialized string in the custom table as well. See my screenshots
https://cl.ly/5dd61aea3a8f
https://cl.ly/092a542c5485Here is my sample code
add_action( 'init', 'prefix_create_table' ); function prefix_create_table() { if ( ! class_exists( 'MB_Custom_Table_API' ) ) { return; } MB_Custom_Table_API::create( 'my_custom_table', array( 'address' => 'TEXT NOT NULL', 'phone' => 'TEXT NOT NULL', 'email' => 'VARCHAR(20) NOT NULL', 'checklist' => 'TEXT NOT NULL', ), array( 'email' ) ); } add_filter( 'rwmb_meta_boxes', 'custom_table_fields' ); function custom_table_fields( $meta_boxes ) { $meta_boxes[] = array( 'title' => 'Meta Box Title', 'storage_type' => 'custom_table', // Important 'table' => 'my_custom_table', // Your custom table name 'fields' => array( array( 'id' => 'address', 'type' => 'text', 'name' => 'Address', ), array( 'id' => 'phone', 'type' => 'text', 'name' => 'Phone', ), array( 'id' => 'email', 'type' => 'email', 'name' => 'Email', ), array( 'id' => 'checklist', 'name' => esc_html__( 'Éligibilité', 'toto' ), 'type' => 'checkbox_list', 'options' => array( 'Pinel' => esc_html__( 'Pinel', 'toto' ), 'Malraux' => esc_html__( 'Malraux', 'toto' ), 'LMNP' => esc_html__( 'LMNP', 'toto' ), 'LMP' => esc_html__( 'LMP', 'toto' ), 'PTZ' => esc_html__( 'PTZ', 'toto' ), ), 'inline' => true, ), ), ); return $meta_boxes; }Long Nguyen
ModeratorHi Steve,
The Settings tab supports to display the field for taxonomy. The default taxonomies of WordPress are Category, Tag, and the category name or sub-categories is the term of the taxonomy Category.
For more information, please follow the documentation
https://developer.wordpress.org/themes/basics/categories-tags-custom-taxonomies/
https://docs.metabox.io/extensions/mb-term-meta/#creating-meta-boxesI hope that makes sense.
Long Nguyen
ModeratorHi,
I'm going to check it out and let you know later.
Long Nguyen
ModeratorHi,
Please take a look at my sample code
add_action( 'rwmb_frontend_after_save_post', function( $object_post ) { add_post_meta( $object_post->post_id, 'test_post_meta', 'Test Post Meta Value' ); } );You can use 4 properties of the MB Frontend Post class
$post_type$post_id$fields$config.For more information, please follow the documentation
https://docs.metabox.io/extensions/mb-frontend-submission/#post-actionsLong Nguyen
ModeratorHi,
It is impossible, the extension Frontend Submission supports to create the post, fields in the frontend, and the field value is saved in the database as the post meta (table wp_postmeta) while the Settings page saves the field value in the database as the theme option (table wp_options).
-
AuthorPosts