Forum Replies Created
-
AuthorPosts
-
August 16, 2021 at 10:01 AM in reply to: ✅Use Checkbox Custom Type and When Checked Show Icon on Frontend #30277
Long Nguyen
ModeratorHi,
You are correct. The code works as well on my local site. Can you please add some text before the code to see if it displays on the single post page? Then make sure that you've updated the field value on the post.
August 15, 2021 at 10:56 PM in reply to: ✅Prepopulate relationship field with current post id #30273Long Nguyen
ModeratorHi,
If you use the frontend hook like the example code, please use the variable
$post_idto add the connection to the submitted post.Add a connection to the post itself after submitting the postLong Nguyen
ModeratorHi,
Currently, there is no option or filter hook to change the content of the table on the dashboard.
Long Nguyen
ModeratorHi,
I will inform the development team to re-check this setting and get back to you later.
Thanks.
Long Nguyen
ModeratorHi,
If you want to execute a function after the users submit the form, you can refer to these hooks
- for both backend and frontend: https://docs.metabox.io/actions/#rwmb_after_save_post
- for the form on the frontend: https://docs.metabox.io/extensions/mb-frontend-submission/#form-actionsLong Nguyen
ModeratorHi,
I'm afraid that there is no action to CRUD data to the custom table without using custom fields. You need to use the methods of WPDB class.
August 15, 2021 at 9:11 PM in reply to: ✅MB Custom Table 2.0.0-rc.1 - Fatal Error in mb-custom-table.php #30268Long Nguyen
ModeratorHi Nicholas,
Thank you for your feedback.
It's the code to load the testing model. Temporarily, you can remove this code or create a folder
testsand the file05-transactional-model.phpinside. Get the content of the file here https://pastebin.com/vJ3iDb3mAnd read more on the documentation https://docs.metabox.io/extensions/mb-custom-table/#custom-models
Long Nguyen
ModeratorHi Tobias,
I think it's very complicated to code from scratch to show matches football like that. You can use other third-party plugins such as
https://wordpress.org/plugins/football-pool/
https://wordpress.org/plugins/football-leagues-by-anwppro/Long Nguyen
ModeratorHi Kelly,
You should create a backup first. Due to the different data format when saving to the database of ACF and Meta Box, our plugin will attempt to modify the existing data in custom fields created by ACF to works with Meta Box.
Get more details here https://docs.metabox.io/extensions/mb-acf-migration/
Long Nguyen
ModeratorHi Nicole,
The extension MB Frontend Submission only allows the users to edit their posts on the frontend. If the editors want to edit anyone's posts, they should go to the admin area to do that.
Long Nguyen
ModeratorHi Peter,
Meta Box uses nonces to prevent misuse or malicious requests. As the nonce fields are outputted directly in the HTML, they might be cached by caching plugins such as W3 Total Cache, WP Super Cache, etc. And thus, the verification of the nonce might not work properly and break Ajax's request. In this case, please do not cache the page where the form is embedded (both caching plugins allow you to do that). For more information, please read this technical article.
August 14, 2021 at 8:19 AM in reply to: Trying to use php to add advanced img from group field #30246Long Nguyen
ModeratorHi Jimimac,
Please follow this documentation to know how to show the image in a group https://docs.metabox.io/extensions/meta-box-group/#sub-field-values
Long Nguyen
ModeratorHi,
I'm afraid that there is no hook to upload images to the custom folder. Meta Box supports field type
fileto allow the user to upload images to the custom folder. Please read more here https://docs.metabox.io/fields/file/So I think you can extend this field type to use this feature.
Long Nguyen
ModeratorHi,
Yes, the submission pages should have the frontend submit shortcode. And you should add the ID of the submission pages to the attributes
editof the dashboard shortcode.Long Nguyen
ModeratorHi,
Sorry, it looks like the field post. You can use the public API of Relationships to add the relationship to a post itself after submitting the post. Please read more on the documentation
https://docs.metabox.io/extensions/mb-relationships/#creating-connections-programmatically
https://docs.metabox.io/extensions/mb-frontend-submission/#form-actionsFor example:
//Register relationship add_action( 'mb_relationships_init', function() { MB_Relationships_API::register( [ 'id' => 'posts_to_posts', 'from' => 'post', 'to' => 'post', 'reciprocal' => true, ] ); } ); //Add a connection to the post itself after submitting the post add_action( 'rwmb_frontend_after_process', function( $config, $post_id ) { MB_Relationships_API::add( $post_id, $post_id, 'posts_to_posts', $order_from = 1, $order_to = 1 ); }, 10, 2 ); -
AuthorPosts