Forum Replies Created
-
AuthorPosts
-
September 14, 2021 at 9:21 PM in reply to: Metabox settings page / color picker / css variables / Oxygen #30755
Long Nguyen
ModeratorHi,
The developers of WPDevDesign mark the content private so I cannot follow how they do. They could use custom code to create the variable CSS like that. You can try to contact them to do the same with Meta Box.
September 14, 2021 at 5:01 PM in reply to: ✅Custom Table Migrate/Transfer the existing values to new table #30753Long Nguyen
ModeratorRefer to this article https://metabox.io/move-custom-fields-data-to-custom-tables/
September 14, 2021 at 11:48 AM in reply to: ✅Custom Table Migrate/Transfer the existing values to new table #30750Long Nguyen
ModeratorHi,
I think it is possible to move current post data from the default table
wp_postmetato the custom table. But need a lot of code to do, you can try to use the public APIupdateto do that. Please read more here https://docs.metabox.io/extensions/mb-custom-table/#updateLong Nguyen
ModeratorHi Cees,
You can query posts and order by the meta value as well. Please read more on this documentation https://developer.wordpress.org/reference/classes/wp_query/#order-orderby-parameters
Long Nguyen
ModeratorHi Eddie,
There is no option to create a post of a post type from another post type like that. If you are familiar with coding, you can use the WordPress function wp_insert_post() to create a post of a post type.
Long Nguyen
ModeratorHi,
Yes, we can add multiple meta box IDs by using separate commas but without space. Like this
[mb_frontend_form id='review-fields,review-relationship_relationships_to' post_fields='title' post_type='review']Long Nguyen
ModeratorHi,
You can create the field taxonomy to add the taxonomy for the post on the frontend. Other custom fields will work like that.
For example: the code to creates a meta box and custom fields
add_filter( 'rwmb_meta_boxes', 'your_prefix_function_name' ); function your_prefix_function_name( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Post Meta', 'your-text-domain' ), 'id' => 'post-meta', 'post_types' => ['page'], 'fields' => [ [ 'name' => __( 'City', 'your-text-domain' ), 'id' => $prefix . 'city', 'type' => 'text', ], [ 'name' => __( 'Taxonomy', 'your-text-domain' ), 'id' => $prefix . 'taxonomy_j6xupbwl47k', 'type' => 'taxonomy', 'taxonomy' => ['category'], 'field_type' => 'select_advanced', ], ], ]; return $meta_boxes; }Frontend shortcode:
[mb_frontend_form id="post-meta" post_fields="title,content" post_type="page"]Please read more on the documentation https://docs.metabox.io/extensions/mb-frontend-submission/
Long Nguyen
ModeratorHi,
It works like the sub-menu page in WordPress
The slug name for the parent menu (or the file name of a standard WordPress admin page)For example, if you want to show the transaction under the Page menu, assign the setting
parentto this slugedit.php?post_type=pagefunction prefix_register_transaction_model() { mb_register_model( 'transaction', [ 'table' => 'transactions', 'labels' => [ 'name' => 'Transactions', 'singular_name' => 'Transaction', ], 'menu_icon' => 'dashicons-money-alt', 'parent' => 'edit.php?post_type=page' ] ); }Get more details on the documentation
https://developer.wordpress.org/reference/functions/add_submenu_page/#user-contributed-notesLong Nguyen
ModeratorHi Nicholas,
We've updated the documentation about the API to manipulate the custom table data. Please read more here https://docs.metabox.io/extensions/mb-custom-table/#api
Let me know if it helped.
Long Nguyen
ModeratorHi,
Here is an example shortcode to create the custom post type and custom fields on the frontend
[mb_frontend_form id="meta-box-id" post_fields="title,content" post_type="post-type-slug"]And the code to add HTML code to wrap the form
add_action( 'rwmb_frontend_before_form', function( $config ) { echo '<div class="my-custom-class">'; } ); add_action( 'rwmb_frontend_after_form', function( $config ) { echo '</div>'; } );Long Nguyen
ModeratorHi,
Thanks for your feedback.
The multiple steps form feature for this extension is on our roadmap. Please vote for it here https://trello.com/b/OCOz26GM/meta-boxs-public-roadmap
Long Nguyen
ModeratorHi,
The validation feature uses jQuery to check the input name instead of the input ID (field ID) so please change a little bit of the field ID in the
rulesfor two fieldsfileandimageto this'_file_' . $prefix . 'uploaded_files[]'. The code should be:add_filter( 'rwmb_meta_boxes', 'nvf_register_mb_candidatura_form_input' ); function nvf_register_mb_candidatura_form_input( $meta_boxes ) { $prefix = ''; $meta_boxes[] = [ 'title' => __( 'Input Formulário', 'nvf-gb-front' ), 'id' => 'candidatura-form-details', 'post_types' => ['candidatura_bolsa'], 'fields' => [ [ 'name' => __( 'Upload Requested Files', 'nvf-gb-front' ), 'id' => $prefix . 'uploaded_files', 'type' => 'file', 'max_file_uploads' => 20, 'force_delete' => true, ], ], 'validation' => [ 'rules' => [ '_file_' . $prefix . 'uploaded_files[]' => [ 'extension' => 'pdf', ], ], 'messages' => [ '_file_' . $prefix . 'uploaded_files[]' => [ 'extension' => 'file extension not allowed', ], ], ], ]; return $meta_boxes; }Long Nguyen
ModeratorHi Kevin,
I've also experienced this issue with Oxygen 3.9 Alpha 1. It does not support getting the field value that is a subfield in a field type
groupand cloneable. You can report this issue to the Oxygen development team, this version is for testing and they will work for the official release.Long Nguyen
ModeratorHi,
To display a user list with user meta value on the frontend, you can follow this article https://metabox.io/display-user-list-on-the-frontend-with-meta-box/
You still need basic knowledge about coding to do that. It's not possible to show anything on the frontend in a few clicks with Meta Box.
Long Nguyen
ModeratorHi,
Can you please share the code that creates the relationship
client_to_assignment? I've also replied to your question in the ticket system. Here is a copy of it:The reciprocal setting should be used for the same object type (post to post, user to user, term to term). What does that mean?
If you do not enable the reciprocal, for example, there are two relationships box display on the user page, Connect To and Connect From itself. Like this screenshot https://imgur.com/MHp7smp
If you enable the reciprocal, there is only one relationship box to select the user connected.And if this setting is enabled for the connection with the different object types. The relationship box to show the connection only show on the from object.
-
AuthorPosts