Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi,
Yes, you can do that with MB Settings Page. There's a settings
help_tabsfor settings pages. See this documentation for details.Anh Tran
KeymasterHello,
At the moment, once you take the PHP code and remove the settings from the MB Builder, there's no way to edit the field group.
In order to do so, I suggest after taking the PHP code, export the field group settings from MB Builder. Then whenever you want to edit the field group, just import it back and edit.
Anh Tran
KeymasterHi Clayton,
Thanks a lot for your valuable feedback! I didn't think about the 2 identical meta boxes appear on both sides (since it still works).
I like the idea of adding
reciprocal => trueto the relationship. It's simple and easy to understand. My additional thought might be we should let users define only one meta box instead of 2. Would you mind helping me on Github?May 4, 2019 at 9:43 AM in reply to: ✅Combine Group Title using a FIELD => ID + numeric indicator {#} #14415Anh Tran
KeymasterHi G.,
In the latest version of Group, we have improved the settings for group title, so you can simply enter something like this:
'group_title' => '{#} {field_1} {field_2} Something else'I have just updated the docs for that.
Anh Tran
KeymasterHi Reinhard,
Unfortunately, the plugins don't support creating dashboard widgets. Please follow this docs to do so:
https://codex.wordpress.org/Dashboard_Widgets_API
https://www.cssigniter.com/make-wordpress-dashboard-widget/
https://premium.wpmudev.org/blog/adding-custom-widgets-to-the-wordpress-admin-dashboard/If you're using Elementor, here is a good tutorial on doing that:
https://powerpackelements.com/custom-wordpress-dashboard-elementor/
May 3, 2019 at 1:48 PM in reply to: ✅Problem with autocomplete field in OSM when I use with googlemap in the sameform #14407Anh Tran
KeymasterHi Sergio,
Please use either of them. The address field, which is used for autocompletion works only with one map. Putting 2 maps will break the code.
Anh Tran
KeymasterHi Neil,
But I was having issues when testing the form… the screen goes blank and eventually times out. Once I remove the map module, the problem goes away immediately.
Can you give more details about this? Are you testing the form in the back end or front end? Do you see any error in the console? Is the Google Maps API key correct?
Anh Tran
KeymasterHi Milen,
That can be done with the Custom HTML field type. I used it a lot in the Demo site. Please take a look.
May 2, 2019 at 11:24 AM in reply to: ✅Filterin select advanced with custom field in custom table #14380Anh Tran
KeymasterHi Sergio,
I think that can be done with an extra query to the data base:
- Make a custom query to the custom table to get the ID of the users you want to select:
global $wpdb; $user_ids = $wpdb->get_col( "SELECT ID FROM yourtable WHERE field_1 = 'value_1'" );- Then in your options of the
userfield, set theincludeparam:
[ 'type' => 'user', 'query_args' => [ 'include' => $user_ids, // get from above ], ]Anh Tran
KeymasterHi Sergio,
At the moment, we haven't supported OSM for Geolocation extension yet. It was on our plan but we haven't finished it yet. We'll try to do it as soon as we can.
Anh Tran
KeymasterHi Dave,
Please try this script (put it in your
functions.phpfile and go to this URL:yourdomain.com?action=migrate):The idea of the script is:
- Make sure it runs only when the URL contains
?action=migrateto avoid running the script on every page load. - Query all the posts that need to migrate the data. You should modify the query to get your correct posts.
- For each post, get the old meta value for each field. Note about the value format to see if it's an array or simple string.
- Insert the values into the new table. If the value is an array, it need to be serialized.
The script comes directly from my mind without testing, so please check it first.
May 2, 2019 at 11:02 AM in reply to: Hidden a group of metabox fields wiht a radio value of another metabox group #14377Anh Tran
KeymasterHi Sergio,
There are 2 ways to do that as you already described in your question:
- Set the rule for each field in the meta box B, or
- Set the rule for the whole meta box B.
I think the 2nd solution is better and cleaner. This rule should be put in the settings of the meta box B:
'hidden' => array( 'radio_field_id', '=, 'radio_1' ),The rule should specify the field ID, not the meta box ID (since the meta box is just a wrap of fields).
Anh Tran
KeymasterHi William,
It's necessary to check if a group has sub-values for title and image. Please try this code:
<?php $product_colour = rwmb_meta( 'product-colour' ); // ID of the group if ( ! empty( $product_colour ) ) { if ( ! empty( $product_colour['title'] ) ) { echo '<h3>', $product_colour['title'], '</h3>'; } if ( ! empty( $product_colour['image'] ) ) { $image = RWMB_Image_Field::file_info( $product_colour['image'], ['size' => 'thumbnail'] ); echo '<img src="', $image['url'], '">'; } } ?>Anh Tran
KeymasterHi Neil,
I've just answered you in another topic. The rule here is: you can add only one tab navigation, no nesting tabs. But for groups, you can add as many groups with any nesting level.
To make things cleaner on the edit screen, I'd suggest using collapsible groups.
Anh Tran
KeymasterDue to the nature of group, a private key is the only way I found to store the current state of a collapsible group, especially with nested groups.
I'll make a commit for the REST API extension to strip it from the output.
Update: the fix is available in the version 1.3.4.
-
AuthorPosts