Forum Replies Created
-
AuthorPosts
-
Peter
ModeratorHello,
Is there any chance you read my request above? Please export the field group to a JSON file and share it here, I will help you check the field settings.
Peter
ModeratorHello Tanja,
If you are using the builder, please export the field group to a JSON file and share it here. If you use the code to register the custom fields, please share the code also.
I will help you check the field settings and conditional logic.
Following the documentation https://docs.metabox.io/extensions/meta-box-builder/#export--import
https://docs.metabox.io/creating-fields-with-code/Peter
ModeratorHello Nick,
I'm afraid that it isn't possible. As I mentioned above, the column name in the custom table must match the field ID when you register/create the custom field. If you want to save data to separate custom table tables with one frontend form, you can create more field groups and add their IDs to the frontend shortcode.
[mb_frontend_form id='field-group_id_1,field-group_id_2,field-group_id_3' post_fields='title,content']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. -
AuthorPosts