Forum Replies Created
-
AuthorPosts
-
Long Nguyen
ModeratorHi Johannes,
It's the behavior of the WordPress core when you are in the backend, click Add new post, leave all blank (title, content ...) and just click Publish, it will save a new post with the title (no title).
So when you are in the frontend (not logged in), the extension MB Frontend Submission does the same thing, leave all fields blank and click Submit, a new post is created with the title (No title).
You can make a/some fields required when submitting the post by adding the setting
required => trueto the field or use the Validation.
https://docs.metabox.io/extensions/mb-frontend-submission/#reorder-post-fields$meta_boxes[] = [ 'title' => 'Bill Submit', 'id' => 'bill', 'fields' => [ [ 'name' => 'Submission Date', 'id' => 'submission_date', 'type' => 'date', ], [ 'name' => 'Title', 'id' => 'post_title', // THIS 'required' => true, ], [ 'name' => 'Type', 'id' => 'type', 'type' => 'select', 'options' => [ 'docs' => 'Document', 'receipt' => 'Receipt', ], ], [ 'name' => 'Description', 'type' => 'textarea', 'id' => 'post_content', // THIS ], [ 'name' => 'Thumbnail', 'type' => 'single_image', 'id' => '_thumbnail_id', // THIS ], ], ]August 14, 2020 at 9:59 AM in reply to: ✅Fatal error: Uncaught Error: Class 'MBBParser\Parsers\MetaBox' not found #21269Long Nguyen
ModeratorHi,
Refer to this topic https://support.metabox.io/topic/uncaught-error-class-mbbparserparsersmetabox-not-found/.
Please try to re-install the plugin Meta Box AIO which downloaded from the My Account page then check the issue again.
Long Nguyen
ModeratorHi Jean,
Some fields
image_advanced,file_advanced,single_image... come with the input type hidden to store the information of the field and the media item (image, file). See my screenshot https://share.getcloudapp.com/ApukkgyQ.It's the design of the field to save the value (media ID) to the database. Let me know if there is any problem with these fields.
Long Nguyen
ModeratorHi Luca,
We have the extension MB Conditional Logic to show/hide meta boxes, custom fields, or any elements based on other fields’ values. For more information, please follow this documentation https://docs.metabox.io/extensions/meta-box-conditional-logic/.
Long Nguyen
ModeratorHi,
The problem happens because the code used the function
esc_attr(), it escapes HTML code and returns only a string that's why we only see the<ul><li>tag.I've just removed it then we can see the list as well.
$benefits = $_POST['benefits']; $aufgaben = $_POST['aufgaben']; $fachwissen = $_POST['fachwissen'];Or you can keep the function
esc_attr()then use the functionhtmlspecialchars_decode()to convert special HTML entities back to characters./* Aufgaben */ function kie_job_get_aufgaben(){ return htmlspecialchars_decode( strip_tags(rwmb_meta( 'kie_aufgaben', get_the_ID() ), '<ul><li></ul></li>') ); }August 13, 2020 at 11:06 AM in reply to: ✅Fatal error: Uncaught Error: Class 'MBBParser\Parsers\MetaBox' not found #21243Long Nguyen
ModeratorHi,
Please update the new version 1.11.18 of the extension Meta Box AIO to fix this issue.
Thank you.
August 13, 2020 at 11:06 AM in reply to: ✅Uncaught Error: Class 'MBBParser\Parsers\Metabox' not found #21242Long Nguyen
ModeratorHi,
Please update the new version 1.11.18 of the extension Meta Box AIO to fix this issue.
Thank you.
Long Nguyen
ModeratorUse your code to reproduce the issue, but it still works as well https://www.loom.com/share/9a7c2daf36d34d9683ffd09f7b69d11e.
Long Nguyen
ModeratorHi,
Here is my sample code to get the
single_imagefield's information via custom query$query = new WP_Query(array( 'post_type' => 'post', 'post_status' => 'publish', 'posts_per_page' => 10, )); while ($query->have_posts()) { $query->the_post(); $image = rwmb_meta( 'post_meta_single_image', array( 'size' => 'thumbnail' ) ); echo '<a href="', $image['full_url'], '"><img src="', $image['url'], '"></a><br>'; echo "<pre>"; print_r($image); echo "</pre>"; }and a screen record demonstrates https://www.loom.com/share/d31c328cc0654b10ad4aeed977e23900.
Could you please take some screenshots of a screen record of this issue? I will take a closer look and give a quick response.
Long Nguyen
ModeratorHi,
Please see my screen record https://www.loom.com/share/9d172996936742d9803a0321e62366c7.
When you get the field
single_imagevalue by the helper functionrwmb_meta(), it returns an array of the image as well.You can check again with this code
$imagen = rwmb_meta( 'if_vehiculos_imagen2', array( 'size' => 'thumbnail' ), $query->post->ID );Long Nguyen
ModeratorHi,
The text field can help you to add the character $ and thousand separators. See my screen record https://www.loom.com/share/5734ebb11914426b8444e403d6ddb678.
And the sample code to sanitize the field.
function custom_sanitize_numer( $value ) { // Format number, add separate comma $value = number_format( (int) $value ); // Add character $ before number if ( 0 !== strpos( $value, '$' ) ) { $value = '$' . $value; } return $value; }August 12, 2020 at 2:43 PM in reply to: ✅Email field does not take any html email parameters, is there a way to do that? #21224Long Nguyen
ModeratorHi,
You can use the custom sanitize callback to add some text after the field email. See my screenshot https://share.getcloudapp.com/X6uNOn7K.
function custom_sanitize_email( $value ) { $value = $value . '?subject=AboutMyWebsite'; return $value; }For more information, please follow this documentation https://docs.metabox.io/sanitization/#custom-sanitize-callback.
Long Nguyen
ModeratorHi Eric,
You can use the custom sanitize callback to format the value of the field number. Please follow these documentations.
https://docs.metabox.io/sanitization/#custom-sanitize-callback
https://www.php.net/manual/en/function.number-format.phpAugust 11, 2020 at 2:53 PM in reply to: ✅Customizer Draft/Schedule Does not work with MB Settings Values #21205Long Nguyen
Moderator@Jeremy
We've just released the new version 1.11.17 of the extension MB AIO which solves this issue. Please update the extension MB AIO.Long Nguyen
ModeratorHi,
Thank you for pointing this out. I'm going to check the issue and let you know later.
-
AuthorPosts