Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi Paul,
Not only the subfield in a group but also the top field. If you set to upload the file to a custom folder, the value saved in the database is the file URL, not the file ID like upload to the WordPress standard folder.
August 23, 2022 at 10:09 PM in reply to: TAXONOMY FIELD CONDITIONAL DISPLAY USING RADIO NOT WORKING #37988Long Nguyen
ModeratorHi Richard,
The value used to compare in the conditional logic should be the option value, not the label. In your case, it should be
yes, instead ofYes.'hidden' => [ 'when' => [['org_previous', '=', 'yes']], 'relation' => 'or', ],You can see the conditional logic works as well on my local site.
https://monosnap.com/file/d8ZXjUuqZzukS4j19XaeW2jrpZkfIILong Nguyen
ModeratorHi,
If you want to use the script code on the frontend, please check this sample code
function test_callback( $attributes, $is_preview = false, $post_id = null ) { echo mb_get_block_field( 'section_title' ); ?> <script type="text/javascript"> console.log('hello from render callback'); alert('Hello MB Blocks'); </script> <?php }If you want to preview the script code on the backend, please follow this documentation https://docs.metabox.io/extensions/mb-blocks/#enqueue_script
August 23, 2022 at 12:57 PM in reply to: ✅Error while inserting $field_id in rwmb_after_save_post #37979Long Nguyen
ModeratorHi Ben,
So do you want to sort the cloneable group based on the subfield value (date)? Meta Box does not support a field type
bs_dateso I'm not sure what exactly the field value is but the main goal is, you need to update the group value outside the loop. For example:add_action( 'rwmb_pieces_jointes_et_dates_after_save_post', function( $object_id ) { $group_values = rwmb_meta( 'pieces_jointes_et_dates', '', $object_id ); if ( ! empty( $group_values ) ) { foreach ( $group_values as $group_key => $group_value ) { $dates_to_sort = isset( $group_value['date_fichier'] ) ? $group_value['date_fichier'] : ''; // do something here to update the subfield value for each clone group $group_values[$group_key]['date_fichier'] = '9/2/2022'; } } //update the whole group value update_post_meta( $object_id, 'pieces_jointes_et_dates', $group_values ); } );August 22, 2022 at 11:11 PM in reply to: Fields are empty after moving MetaBox from TAB to sub settings page #37975Long Nguyen
ModeratorHi Cees,
If you use the builder or code to change the settings page of a field group/meta box, the custom fields will not display on the old settings page but the setting value is still available in the database until you delete it (like post meta).
You can access your database and delete the old setting value manually.Long Nguyen
ModeratorHi,
The extension MB Relationships just helps you to create a relation between objects (post/terms/users). In your specific case, you need to create many codes to exclude users from a select box if they are already selected in another box like a family.
Using the settingquery_argswill help you to do that https://docs.metabox.io/extensions/mb-relationships/Long Nguyen
ModeratorHi,
I do not see that issue when outputting the subfield URL value in a cloneable group. After creating a group skin in Templates > Theme Builder, you need to edit the post with Elementor and insert the widget MB Group to select the group and skin to display subfield value on the frontend.
Here is the demo screen record https://monosnap.com/file/b9qaHxQ5LknR99Os0DJqjuPaWNS7FPAugust 22, 2022 at 10:22 PM in reply to: Outputting a different user meta photo from field group #37972Long Nguyen
ModeratorHi,
When I use a user field within a group, is that returned value the user's ID?
Yes, you will get the user ID when getting the subfield value in a group field. Please read more on this documentation https://docs.metabox.io/extensions/meta-box-group/#sub-field-values
After having the user ID, you can get the field value associated with the user (user meta) by following the documentation https://docs.metabox.io/extensions/mb-user-meta/#getting-field-value
Hope that makes sense.
Long Nguyen
ModeratorHi Catharina,
Can you please share some screenshots of the issue on your site? I do not see any issue with Polylang and MB Blocks on my site. You can also try to deactivate all plugins except Meta Box, MB extensions and Polylang to recheck this issue.
August 22, 2022 at 9:28 PM in reply to: TAXONOMY FIELD CONDITIONAL DISPLAY USING RADIO NOT WORKING #37969Long Nguyen
ModeratorHi Richard,
Can you please share the code that creates the custom fields on your site? Refer to this documentation https://docs.metabox.io/extensions/meta-box-builder/#getting-php-code
Long Nguyen
ModeratorHi Paul,
If you use the field type
fileand save the file uploaded in a custom folder, the value saved in the database is the file URL, not the file ID. Please get more details on this documentation https://docs.metabox.io/fields/file/#upload-to-a-custom-folderLong Nguyen
ModeratorHi Aaron,
If you use the PHP code to register the custom block, please use the setting
render_callbackorrender_templatewith PHP code. Read more on the documentation https://docs.metabox.io/extensions/mb-blocks/#render_callbackIf you use the builder, please remove the script tag in the code area and re-check this issue.
Long Nguyen
ModeratorHi,
Thanks for your feedback.
I will inform the development team to fix this issue in the next update.
August 22, 2022 at 1:03 PM in reply to: Fields are empty after moving MetaBox from TAB to sub settings page #37962Long Nguyen
ModeratorHi Cees,
The top and sub-settings pages have their own option names and save field values to the database in different rows. So the field values will not be displayed when you move the custom fields from the top settings page to the sub-settings page.
You can try to use the field
backupto move the field value to another settings page, please read more on the documentation https://docs.metabox.io/extensions/mb-settings-page/#backup--restore-settingsLong Nguyen
ModeratorHi,
Please pull the latest commit on the repository and recheck this issue on your site https://github.com/wpmetabox/mb-elementor-integrator
Let me know how it goes. -
AuthorPosts