Forum Replies Created
-
AuthorPosts
-
March 19, 2024 at 8:39 PM in reply to: ✅It's possible to save custom fields only to custom table bypassing wp_posts? #44914
Peter
ModeratorHello,
Currently, the custom model doesn't work with frontend submission form. You can create the model entries in the admin area.
Peter
ModeratorHello,
Does it work on your site?
Peter
ModeratorHello,
According to this code https://pastebin.com/ZDcDxd0S I see the custom fields are associated with a settings page, so the field value will be saved to the table
wp_options. Please follow the documentation
https://docs.metabox.io/extensions/mb-settings-page/Regarding the "meta_box" key in the table wp_postmeta, it's the data of the field group post, post type
meta-box.Peter
ModeratorHello Diego,
Please update WordPress core to the latest version 6.4.3 and check this issue again.
Peter
ModeratorHello Bomes,
There isn't a filter hook to change the group title. The subfield value in the group title will display the original that is saved to the database.
Peter
ModeratorHello Nick,
It is possible to adjust the field value before displaying it in the editing form. You can use the filter hook
rwmb_{$field_id}_field_metato hook the callback function to a specific field.The subfield in a cloneable group will have a structure like this
Array ( [0] => Array ( [text_field_id] => test text 1 ) [1] => Array ( [text_field_id] => test text 2 ) )then you can change the text field value in the group with the code:
add_filter( 'rwmb_groupFieldID_field_meta', function( $value, $field, $saved ) { $value[1]['text_field_id'] = 'adjust the second text field value'; return $value; }, 10, 3);Following the documentation https://docs.metabox.io/filters/rwmb-field-meta/
Peter
ModeratorHello Nick,
You can use the public API to add or update the field value to a custom table. Please follow the documentation
https://docs.metabox.io/extensions/mb-custom-table/#add
https://docs.metabox.io/extensions/mb-custom-table/#updateNote: the feature "Clone as multiple" doesn't work with the custom table.
Peter
ModeratorHello Darwin,
If you have a question about the account and license key, please contact us here https://metabox.io/contact/
we will get in touch with you shortly.Peter
ModeratorHello Jayron,
In order to correct your code, I need to check the field settings in the field group. Please export the field group to a JSON file and share it here, following the documentation https://docs.metabox.io/extensions/meta-box-builder/#export--import
Peter
ModeratorHello,
With the builder, you can easily save the field value to a custom table and the builder creates the table automatically. Please follow the documentation https://docs.metabox.io/extensions/mb-custom-table/#getting-started
Then you can check the custom table and field value in the database if it is created and stored field value correctly.
Peter
ModeratorHello,
I think you can update a field value by following a previous topic https://support.metabox.io/topic/rwmb_frontend_validate-and-update-_post-value/
and the function update_post_meta().Peter
ModeratorHello,
I cannot reproduce the issue on my end. Can you please export the field group to a JSON file and share it here? And let me know how to reproduce it.
March 15, 2024 at 10:22 PM in reply to: Dynamically populating options values for select2 doesn't save to database #44878Peter
ModeratorAlso, please try to disable the sanitization and check the save value process again. Following the documentation https://docs.metabox.io/sanitization/#bypass-the-sanitization
Peter
ModeratorHello,
Please click on this link https://metabox.io/contact/
you will see a contact form. Add your site credentials (admin account and FTP) and details of the upgrade license. We will help you resolve issues.March 15, 2024 at 9:43 PM in reply to: Dynamically populating options values for select2 doesn't save to database #44876Peter
ModeratorHello,
You can try to use the filter hook
rwmb_after_save_fieldto update the field value from the $_POST variable. However, I'm not sure if it can work with your custom JS code to show the saved/current value after saving the post.Following the documentation https://docs.metabox.io/actions/rwmb-after-save-field/
-
AuthorPosts