Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorCan you please share the code that validates your form? The variable
$is_validshould be assigned tofalseif the condition does not match.add_filter( 'rwmb_profile_validate', function( $is_valid, $config ) { if ( 'invitation_verification' === $config['id'] ) { if ( '123' !== $_POST['invitation_code'] ) { $is_valid = false; } } return $is_valid; }, 10, 2 );Long Nguyen
ModeratorHi Tobias,
If you follow this article to create a Recipe with Meta Box https://metabox.io/wordpress-create-recipe-with-meta-box-plugin/ and want to show the number of ingredients calculated, I recommend using the field number for ingredients instead of WYSIWYG. Then you can calculate the ingredient as well
$ingredient = rwmb_meta( 'ingredient' ); $calc_ingredient = $ingredient * 123;Or follow this topic https://support.metabox.io/topic/calculation-in-fields-success-error-messages-jquery-version/
Long Nguyen
ModeratorHi,
With the builder, you can add a
Tabfield above and add other fields under to show in a tab. Screenshot https://share.getcloudapp.com/4gunGezEWith the code, please follow this documentation https://docs.metabox.io/extensions/meta-box-tabs/
July 11, 2021 at 11:08 PM in reply to: ✅Get the extra custom fields from WordPress post field #29427Long Nguyen
ModeratorHi Kirb,
You need to add the argument
relationshipto the variableargs{% set args = { post_type: 'dish', nopaging: true, relationship: {id: 'store_to_dish', from: post.ID}} %}Please read more on this article https://metabox.io/mb-views-how-to-display-relationships/
July 11, 2021 at 11:00 PM in reply to: ✅Show / Hide element in Oxygen using Metabox Switch Field #29426Long Nguyen
ModeratorHi Dom,
You can use the switch field and set the condition to Dynamic Data > select Custom field/meta options > Key: select the field ID. Screen record https://share.getcloudapp.com/GGuWeKmv
Long Nguyen
ModeratorHi,
You can create your own function to get the number of modifications and items in each modification object and then use the loop to create the number of meta boxes. The field should be
textto use for all cases. Just likeadd_filter( 'rwmb_meta_boxes', function() { $modifications = get_the_modification_and_items(); foreach ( $modifications as $index => $modification ) { $meta_boxes[] = [ .... ] } return $meta_boxes; } );Hope that makes sense.
July 10, 2021 at 4:12 PM in reply to: Where to learn Twig for WordPress / {% set args %} - hierarchical CPTs #29415Long Nguyen
ModeratorHi,
At first, you should have basic knowledge about WordPress functions https://codex.wordpress.org/Function_Reference
The View helps us to get the returned data from a WordPress or PHP function and show it via the Twig Template Engine. You can read more on Timber document https://timber.github.io/docs/
Long Nguyen
ModeratorHi,
The title of the collapsible group can show the group index, subfield value. Please get more details on the documentation https://docs.metabox.io/extensions/meta-box-group/#collapsible-groups
For example https://share.getcloudapp.com/6qur1QwE
Long Nguyen
ModeratorHi,
So you need to create a relationship between CPT
storeanddish, then show the related post meta in View, please follow this documentation https://docs.metabox.io/extensions/mb-views/#relationship-fieldsand refer to these topics
https://support.metabox.io/topic/relationship-cpt-title-not-displaying-using-mb-view-shortcode/
https://support.metabox.io/topic/query-in-relationship-post-per-page/July 10, 2021 at 3:23 PM in reply to: ✅Cloneable Fields in View (using shortcode) won't show in Beaver Themer layout #29411Long Nguyen
ModeratorHi Chris,
That means Meta Box cannot get the ID of each post in the module Posts of Beaver Builder to show the field value of each post. You can try to contact Beaver support to ask for getting post ID in the custom post layout. Screenshot https://share.getcloudapp.com/kpuDv7Wb
Or create your own post list with View and insert the shortcode to the page.
Long Nguyen
ModeratorHi,
Thank you for your feedback.
I've escalated this issue to the development team to fix it in the next update.
Long Nguyen
ModeratorHi,
Thanks for your feedback.
I'm going to inform the developer team to consider adding this feature to the to-do list for the future development of the plugin.
July 10, 2021 at 2:07 PM in reply to: Getting server overload to to PHP notice: offset not found #29408Long Nguyen
ModeratorHi,
Thank you for your feedback.
I've escalated this issue to the development team to cover it in the next update.
Long Nguyen
ModeratorHi Viktor,
I think the custom data in the documentation can help you to do this job. Shortcode in the post
[mbv id="your-view-id" my_post_id=102]get the field value of the post ID 102 in the View
{{ mb.rwmb_meta( 'field_id', '', my_post_id ) }}Read more on the documentation https://docs.metabox.io/extensions/mb-views/#custom-data
Long Nguyen
ModeratorHi Paul,
The image displays on the front end based on the layout of your site. Meta Box does not handle the style when outputting the field value.
-
AuthorPosts