Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi,
Thanks for your feedback.
I will inform the development team to fix this issue as soon as possible.
January 11, 2022 at 5:46 PM in reply to: Outputting Data from Cloneable Groups In Custom MB-Blocks #33161Long Nguyen
ModeratorHi,
To show the image subfield in a group, you can use the helper function
RWMB_Image_Field::file_info(). For example:$image_id = isset( $alternating_block['alternating-block_image'] ) ? $alternating_block['alternating-block_image'] : ''; $image = RWMB_Image_Field::file_info( $image_id, ['size' => 'thumbnail'] ); echo '<img src="' . $image['url'] . '">';Get more details here https://docs.metabox.io/extensions/meta-box-group/#sub-field-values
January 11, 2022 at 10:37 AM in reply to: ✅What is the best way to process submitted field data before save it? #33150Long Nguyen
ModeratorHi Marco,
There is a filter
rwmb_frontend_insert_post_datathat is used to modify the submitted post data before saving it to the database. Read more on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/#post-data-filtersLong Nguyen
ModeratorHi John,
You can use the setting
js_optionsto change theyearRange, for example'fields' => [ [ 'name' => __( 'Date', 'your-text-domain' ), 'id' => $prefix . 'date_9m5vr96jdte', 'type' => 'date', 'js_options' => [ 'yearRange' => '1800:2022', ], ], ]In the builder: https://share.getcloudapp.com/E0uobjQ5
Refer to the documentation https://docs.metabox.io/fields/date/#settings
https://api.jqueryui.com/datepicker/#option-yearRangeJanuary 11, 2022 at 10:06 AM in reply to: Outputting Data from Cloneable Groups In Custom MB-Blocks #33148Long Nguyen
ModeratorHi,
To get a field value in the callback function or template, you can use the helper function
mb_get_block_field(). For example:$alternating_block_values = mb_get_block_field( 'alternating-block_group' ); if ( ! empty( $alternating_block_values ) ) { foreach ( $alternating_block_values as $alternating_block ) { $value = isset( $alternating_block['alternating-block_top-heading'] ) ? $alternating_block['alternating-block_top-heading'] : ''; echo $value; // Display sub-field value } }Get more details on the documentation https://docs.metabox.io/extensions/mb-blocks/#render_callback
Long Nguyen
ModeratorHi,
Currently, it is not possible to redirect to a URL if the validation is not passed. I will inform the development team to explore the possibility.
Long Nguyen
ModeratorHi,
Like this topic https://support.metabox.io/topic/change-username-already-exists-message/
it is not possible to change the password strength message, you can translate these messages as well.Long Nguyen
ModeratorHi,
it's possible to generate the PHP required for displaying fields on the front end.
Meta Box does not support a feature to generate code to output the field value like that.
If you want to get the field value of the settings page, please clarify the field ID and option name. For example:
$value = rwmb_meta( 'text_id', ['object_type' => 'setting'], 'my_option' ); echo $value;Get more details on the documentation
https://docs.metabox.io/displaying-fields/#using-code
https://docs.metabox.io/extensions/mb-settings-page/Long Nguyen
ModeratorHi,
Thank you for reaching out.
Here is an example to check a value in the choices of the checkbox list.
{% set value = 'a' %} {% for item in post.checkbox_list %} {% if value in item %} Checked! {% endif %} {% endfor %}Long Nguyen
ModeratorHi,
Meta Box does not support adding a field that populates value from other fields like that. You can follow this topic to create some JS code to set the field value https://support.metabox.io/topic/calculation-in-fields-success-error-messages-jquery-version/
Long Nguyen
ModeratorHi Tom,
It's a rare case, I've not used this before. You can follow this topic to know how to access the dynamic variable name in Twig https://stackoverflow.com/questions/24697313/how-to-access-dynamic-variable-names-in-twig
Long Nguyen
ModeratorHi,
Currently, it is not possible to change the error message
Your username already exists.. But you can use a translation plugin to translate this message to another language as well.Find it in the file
/mb-user-profile/src/User.phpline 80.Long Nguyen
ModeratorHi Nicholas,
You can use the filter
rwmb_profile_validateto validate the user field. It works like the filterrwmb_frontend_validate. Read more on the documentation https://docs.metabox.io/extensions/mb-user-profile/#form-fitlersJanuary 10, 2022 at 9:58 AM in reply to: ✅Image advanced field from Settings page into Oxygen Gallery #33115Long Nguyen
ModeratorHi,
In case of using Oxygen Builder, please reach to them if you have any issues with installation, configuration, compatibility, or usage.
Refer to our support policy https://support.metabox.io/topic/support-policy/Long Nguyen
ModeratorHi,
Thanks for your feedback.
I will inform the development team to consider supporting this feature request.
-
AuthorPosts