Forum Replies Created
-
AuthorPosts
-
Peter
ModeratorHello Yasmine,
Can you please share some screenshots or a screen record of the issue? Do you use a multi-step form, show the current step (page) and hide other ones?
Peter
ModeratorHello,
1. You can combine your code in the second comment (https://support.metabox.io/topic/receive-notifications/?swcfpc=1#post-43569) to check the specific form by form ID and send the email.
2. I'm not sure if a third-party plugin can cause this issue but the send function works as it is. It isn't a Meta Box issue itself.
3. You can get the field email value via the $_POST variable. For example:
wp_mail( $_POST['custom_field_id'],'New submission', 'A new post has been just submitted.');Peter
ModeratorHello there,
You can use PHP code to register the block, then check if the current page is the widget page and return $meta_boxes variable at that point. For example:
// Register a hero content block for Gutenberg. add_filter( 'rwmb_meta_boxes', function( $meta_boxes ) { global $pagenow; if ( $pagenow == 'widgets.php' ) { return $meta_boxes; } $meta_boxes[] = [ 'title' => 'Hero Area', 'id' => 'hero-area', 'type' => 'block', // Important. ... ]; return $meta_boxes; } );Follow the WordPress documentation https://codex.wordpress.org/Global_Variables#Admin_Globals
Peter
ModeratorHello,
The array and object in Twig are different a bit from PHP. You can change the code to this one:
{% set date_query = { relation: 'OR', 0: { key: 'departure_date', value: 'now'|date("Y-m-d"), compare: '<', type: 'DATE' }, 1: { key: 'departure_date', compare: 'NOT EXISTS', type: 'DATE' } } %}Peter
ModeratorHello,
If you add something to the default form, you should create some custom CSS code to style that element. I think it is expected.
If you don't know how to create CSS code, please contact us here https://metabox.io/contact/
our development team will help you with a small fee.Peter
ModeratorHello Yasmine,
You can define an array of custom fields that is not changed across field groups (reusable), then use the function
array_merge()to add more fields to the reusable field group to other field groups for your requirements. For example:add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { // Reusing field group 1 $field_group_1 = [ [ 'name' => __( 'Datetime', 'your-text-domain' ), 'id' => 'datetime_jeq28wycry', 'type' => 'datetime', ] ]; $additional_fields = [ [ 'name' => __( 'Custom Html', 'your-text-domain' ), 'type' => 'custom_html', ], ]; $field_group_2 = array_merge( $field_group_1, $additional_fields ); $meta_boxes[] = [ 'title' => __( 'Field Group 1', 'your-text-domain' ), 'id' => 'field-group-1', 'post_types' => 'page', 'fields' => $field_group_1, ]; $meta_boxes[] = [ 'title' => __( 'Field Group 2', 'your-text-domain' ), 'id' => 'field-group-2', 'post_types' => 'page', 'fields' => $field_group_2, ]; return $meta_boxes; }Peter
ModeratorHello,
There is a parameter
rwmb_frontend_field_post_idin the URL when you edit a post. Then you can use the code below to check if it is a new post submitted (not an edited post):add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) { if( empty( $_GET['rwmb_frontend_field_post_id'] ) ) { // your code to send email goes here } }, 20, 2 );Peter
ModeratorHello Mark,
Please contact us here https://metabox.io/contact/
the development team will help you to fix the issue with the license key.October 21, 2023 at 11:36 AM in reply to: Subscriber User Role cannot upload images to their User profile on the frontend #43574Peter
ModeratorHello,
The problem here is the field single_image supports uploading images via the WordPress media library popup and WordPress does not allow subscriber user role to upload images. You can read more here https://wordpress.org/support/topic/subscriber-role-cannot-upload-media-file/
So in this case, you can use the field type
imageorimage_uploadwhich supports uploading images and it doesn't open the Media Library popup.Peter
ModeratorHello Lisa,
Do you use the images from Media Library instead of Meta Box custom field? Let me know how it goes.
Peter
ModeratorHello Stephen,
You should use the "Reciprocal" option when creating a relationship between one post type, for example: post-to-post, page-to-page. It will prevent two relationship meta boxes when editing a post.
using a product_faq custom field: it looks like you are using a post custom field. The relationship has a separate meta box with a select field when editing the post (Product or FAQ). If it does not work as expected, can you please share some screenshots of the relationship on your site?Read more in the documentation https://docs.metabox.io/extensions/mb-relationships/#using-meta-box-builder
Peter
ModeratorHello,
curently editors can create new setting pagesI do not see that on my demo site. Only the administrator can access the Meta Box builder (mb post types) to create a settings page. Do you use a custom code or a third-party plugin that changes the capabilities of the editor role?
Peter
ModeratorHello there,
You can try to switch to tab Text and use this sample code to add the helper shortcode to the
<a>tag.test <a href="[rwmb_meta id='url_field']">content</a>Remember to replace the double quotes with single quote in the shortcode.
October 17, 2023 at 11:13 PM in reply to: frontend form for relationships acting differently on different pages #43548Peter
ModeratorHello,
Do you use the field type
selectwhen registering the relationship between "bookings" & "enquiries"? Please share the code that you use to register the relationship, I will help you to check the issue.Peter
ModeratorHello,
For the HTML5 attribute, you can use the attribute
pattern. For the advanced validation, you can use the remote validation. Then add your own regex to validate the input value.Following the documentation
https://docs.metabox.io/validation/
https://www.w3schools.com/tags/att_input_pattern.asp -
AuthorPosts