Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi Sergio,
Each meta box (from/to) has an ID:
{relationship_id}_relationships_fromand{relationship_id}_relationships_to, so you can just add these IDs to theidattribute of the shortcode to show on the front end.Anh Tran
KeymasterCan you try entering the ID of the address field into that input box?
Anh Tran
KeymasterHi William,
Thanks for using Meta Box. I've just sent the invoice to your email. Please check it.
Anh Tran
KeymasterHi Sergio,
The first image looks like from the Geolocation extension, doesn't it? The other images looks like from the Map field. Can you check if Geolocation extension is activated on all installations?
June 4, 2019 at 11:07 AM in reply to: How to make repeating post with custom fields using Meta Box #14827Anh Tran
KeymasterHi Jonathan,
Please see this docs: https://docs.metabox.io/extensions/meta-box-group/#outputing-group-in-a-page-builder
Anh Tran
KeymasterHi @easy,
The working code here: https://pastebin.com/qKA2uYWL
There are 2 notes:
- I added the code to get the current post ID
- Query args are set for the current post type, so the param should be in the
frompart instead ofto
I also optimize the query a little bit.
I'm checking the bug with reordering. Thanks for your feedback.
Updated: I've checked the reorder bug and it seems to be the browser cache. Pressing Ctrl-F5 to reload the page without cache will fix this.
Anh Tran
KeymasterAnh Tran
KeymasterHi Neil,
This is an interesting case.
I think you probably don't need a CPT for Menu. Since each location has a specific menu, a CPT Menu probably serves nothing.
If I do this, I probably will set CPTs this way:
- Menu items: each menu item has a default price
- Locations: each location will has a cloneable group of menu items, like this:
- Menu item: a
postfield (for selecting menu items from the list) - Custom price: a
textfield (if that location has a different price for that menu item)
- Menu item: a
If some locations have unique menu items, they should be added as a new posts under Menu items first. Then users can select from the list when edit a Location.
Anh Tran
KeymasterHi Neil,
You can convert the format using PHP
date()function. Assuming your time has format "04:20 PM", and you want to convert to "16:20", here is the code:$time = rwmb_meta( 'field_id' ); // 04:20 PM echo date( 'H:i', strtotime( $time ) ); // 16:20Anh Tran
KeymasterYes, we have resolved this problem and the fix was added in the 4.18.2 version.
Anh Tran
KeymasterHi Dave, sorry for the delay. I couldn't find anything wrong with the code. Can you send me a temporary admin account to take a look into that closer?
Anh Tran
KeymasterPrefix is just an option and sometimes, it confuses people. So in the MB Builder, we don't include it. You can add the prefix manually in the ID fields if you want.
Anh Tran
KeymasterSorry for the delay, here you are.
Anh Tran
KeymasterHmm, looks like the disabled elements won't be submitted when submitting the form.
I think both issues (disable selection and limit the query) can be done like this:
- Make an extra query to get the current selected options (do it by making a SQL query directly to the database). With this, you get the IDs of the connected posts.
- Set the
post__inforquery_argsin the relationship meta box. So the query only get the selected items.
-
AuthorPosts