Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Alex,
I found a bug and fixed it on your site. Please try again. The fix will be added to Meta Box plugin in the next version.
Anh Tran
KeymasterHi Alex,
I got the access details. And I found that you haven't installed the MB Group extension. I installed it for you and it works.
Anh Tran
KeymasterHi Alex,
The
taxonomyfield doesn't save value. Please usetaxonomy_advancedinstead.October 31, 2019 at 11:59 AM in reply to: Thumbnail field in frontend form allows any file type #16750Anh Tran
KeymasterIt's the default browser behavior. I found an answer for that here. Please try this:
add_filter( 'rwmb_frontend_post_thumbnail', function( $field ) { $field['attributes'] = [ 'accept' => 'image/*', 'oninvalid' => 'setCustomValidity()', ]; } );And write a custom JS function
setCustomValidityto handle the invalidity.Anh Tran
KeymasterOctober 30, 2019 at 10:13 AM in reply to: ✅PHP Fatal Error after updating from Version 1.2.5 to 1.2.7 #16741Anh Tran
KeymasterHi Darren, can you please try re-installing the plugin? I've just checked and see the Loader class is available within the plugin.
Anh Tran
KeymasterHi Hazmi, I couldn't replicate this problem. Can you please give more details on that? A video/screenshot is appreciated.
Anh Tran
KeymasterYes, it's possible. Each relationship meta box has an ID:
{$relationship_id}_relationships_fromand{$relationship_id}_relationships_to. You can include these IDs in the form shortcode to show it on the front end.October 29, 2019 at 9:17 AM in reply to: Thumbnail field in frontend form allows any file type #16735Anh Tran
KeymasterHi Ryan, thanks for your feedback. The field actually doesn't filter the file type. There's a small workaround for that which limits the default file picker:
add_filter( 'rwmb_frontend_post_thumbnail', function( $field ) { $field['attributes'] = ['accept' => 'image/*']; } );I'll see if I can add a code to restrict file types with PHP (which is more secured).
October 29, 2019 at 8:48 AM in reply to: Show Custom Post Type Data in place of ID in WP REST API #16734Anh Tran
KeymasterAs this is a custom code to fetch post data, there won't be a field
meta_boxin the post details. You can add a specific meta value if you want, like this:$arr = []; $ids = get_post_meta($post_id, 'prefix-destination-story-field', false); foreach ($ids as $id){ $value = get_post($id, ARRAY_A); // THIS $value['field_id1'] = rwmb_meta( 'field_id1', '', $id ); $value['field_id2'] = rwmb_meta( 'field_id2', '', $id ); array_push($arr, $value); }Anh Tran
KeymasterThanks for your feedback. Somehow readonly is ignored by jQueryUI datepicker. I fixed it here.
Anh Tran
KeymasterHi Neil,
I think it's possible:
- You have a CPT - training
- Each post with the "training" has a video, which is a Meta Box's field.
- It also has a quiz attached to it. Quiz can be created in GF or any plugin. Then attach to the CPT with Meta Box's select field (or any field that allows you to choose a quiz). The options of the select field might need custom code to fetch all available quiz to select from.
On the front end, you can simply display the video and the button to start the quiz. When the quiz is done, see if there's any hook to allow you to update the post (training). If yes, then simply add the tracking data you want. If you want to track the video ID, then you can add the video (attachment) ID.
October 28, 2019 at 8:36 AM in reply to: Show Custom Post Type Data in place of ID in WP REST API #16718Anh Tran
KeymasterHey Sharath,
Please don't just copy and paste my code. I put a comment "Modify your value here", which means you should get the post details from the post ID (
$value) there. Something like this:add_filter( 'rwmb_get_value', function( $value, $field, $args, $post_id ) { // Change value only for REST API. if ( ! defined( 'REST_REQUEST' ) ) { return $value; } if ( 'p' !== $field['id'] ) { return $value; } $value = get_post( $post_id, ARRAY_A ); return $value; }, 10, 4 );Anh Tran
KeymasterYes, you can. If you have your front end form created with MB Frontend Submission, then you can use MB Geolocation for the fields.
If you're looking for a way to support other forms, then it won't work. The extension works only for Meta Box fields.
-
AuthorPosts