Forum Replies Created
-
AuthorPosts
-
Peter
ModeratorHello,
Please share your site admin account by submitting this contact form https://metabox.io/contact/
I will take a look.Peter
ModeratorHello,
I understand the issue. It is related to this topic https://support.metabox.io/topic/dynamically-populate-the-options-of-a-select-custom-field-base-on-global-cf/
you need to use the WordPress function get_option() to get the settings page value (like the theme option) when creating the custom field. At this point, the helper function rwmb_meta() doesn't work.
Here is an example
function test_function() { $options = get_option( 'custom-options' ); $value_a = $options['test_a']; $optionsA = array( '1' => 'Apple', '2' => 'Orange' ); $optionsB = array( '3' => 'Cat', '4' => 'Dog' ); return $value_a ? $optionsA : $optionsB; }If you use the builder, you will need to re-update the field group to update the choice for the field
test_b.Peter
ModeratorHello Johannes,
Thank you for your feedback.
I can reproduce the issue on my site and I've escalated the issue to the development team to fix this. I will get back to you when I have more information.
Peter
ModeratorHello,
Please ensure the option name is added to the helper function, and the separator should be underscore instead of dash. For example
custom_options$value_a = rwmb_meta( 'test_A', array( 'object_type' => 'setting' ), 'custom_options' );Following the documentation https://docs.metabox.io/extensions/mb-settings-page/#using-code
After you save the field test_a value, the
$optionsAwill be returned.Peter
ModeratorHello Nick,
If you want to use the existing table to store the field value, please follow the documentation https://docs.metabox.io/extensions/mb-custom-table/#using-existing-tables
notice the column name must match the field ID when you register/create the custom field.
Peter
ModeratorHello Nick,
I create a custom field type following the documentation https://docs.metabox.io/creating-new-field-types/
and I can use the jQuery validation, frontend filter validation properly. Here is the example code:
add_filter( 'rwmb_meta_boxes', function ( $meta_boxes ) { $meta_boxes[] = [ 'title' => 'Profile', 'id' => 'post-profile', 'post_types' => 'post', 'fields' => [ [ 'name' => 'Hotline', 'id' => 'hotline', 'type' => 'phone', ], ], 'validation' => [ 'rules' => [ 'hotline' => [ 'required' => true, 'minlength' => 7, ], // Rules for other fields ], 'messages' => [ 'hotline' => [ 'required' => 'hotline is required', 'minlength' => 'hotline must be at least 7 characters', ], // Error messages for other fields ], ], ]; return $meta_boxes; } ); add_filter( 'rwmb_frontend_validate', function( $validate, $config ) { // Check if users have selected files for an image upload field. if ( empty( $_POST['hotline'] ) ) { $validate = 'Please add a phone number'; } return $validate; }, 10, 2 );Peter
ModeratorHello Yumiko,
Can you please share more details of the issue on your site? Because I don't know what exactly the issue is. Let me know the callback function, other field values, settings page ... and screenshots of them.
Peter
ModeratorHello metafan,
I'm sorry about this experience but it isn't solved. I will let you know when this event is added back to the MB Blocks plugin.
Peter
ModeratorHello Nick,
The filter
rwmb_frontend_validatedoesn't pass the field settings to the callback function. You can use the helper functionrwmb_get_field_settingsto get the field settings.
Please follow the documentation https://docs.metabox.io/functions/rwmb-get-field-settings/Peter
ModeratorHello,
You can go to the My Account page, login to your account and download the Meta Box extension plugins to install it on your site manually. Please check this screenshot https://imgur.com/0M047T7
Peter
ModeratorHello Jorge,
I don't see any specific settings or an addon plugin when they use ACF to create custom fields for Squirrly so I think it will work with Meta Box. Can you try to create the same field ID and see if it works?
December 18, 2024 at 10:22 PM in reply to: Not allowed to edit a post published through MB Frontend Submission #47208Peter
ModeratorHello,
If you use the MB frontend shortcodes to show the form and dashboard in the frontend without using Bricks, do they work on your site? Please follow the documentation
https://docs.metabox.io/extensions/mb-frontend-submission/
I think the issue arises from the Bricks element itself, not from Meta Box.Peter
ModeratorHello Jacques,
You had a similar issue in the past, here is the topic https://support.metabox.io/topic/dont-know-where-the-settings-are-and-no-longer-working-upon-upgrading/
I already replied to this issue in the ticket system:
I'm not able to edit the theme file on your test site. But I suggest you check two files that get the slider option of the category and show the HTML elements. /wp-content/themes/thrill/partials/header/title.php /wp-content/themes/thrill/includes/title.php or contact your developer who creates this custom theme and ask them to check the issue for you.Can you please recheck the file that I suggested?
Peter
ModeratorHello Neha,
Do you try to switch the theme to a WordPress theme also? If you still cannot edit a field group, please share your site admin account by submitting this contact form https://metabox.io/contact/
I will take a look.December 17, 2024 at 10:04 AM in reply to: MB Custom Posts With No Custom Fields are Blank Pages In Edit #47195Peter
ModeratorHello Brent,
The custom fields when editing a CPT are displayed properly on my site, screenshot https://imgur.com/AARZKaW
Please try to clear all caches (plugin, browser, hosting ...) then deactivate all plugins except Meta Box, MB AIO, switch to a WordPress theme and check the issue again.
-
AuthorPosts