Forum Replies Created
-
AuthorPosts
-
Anh Tran
KeymasterHi webidia,
Thanks for downloading Conditional Logic and reporting that bug, we've just released new version, can you please update?
For
file_advancedandimage_advanced, it returns num of uploaded files so you can define conditional logic like so:// Visible when file_advanced is empty 'visible' => array('file_advanced', 0) // Or hidden when image_advanced is exists at least 2 images 'visible' => array('image_advanced', '>=', 2)Best regards,
Tan Nguyen
Anh Tran
KeymasterHi Sinusite,
Thanks again for your question you're welcome to post any question about our Meta Box so please don't hesitate to tell me if you have problems ๐
As noted in documentation:
"This extension shows/hides meta boxes when page loads or after saving. It does not include Javascript code to toggle meta boxes immediately when conditions changed."The different between Conditional Logic and Include / Exclude basically is:
- Conditional Logic run when field values change immediately while Include/Exclude run conditions on page load.
- Conditional Logic can hide meta box, fields or any DOM element while Include/Exclude only works with meta box.
- Conditional Logic only hide elements, the element still exists while Include/Exclude can totally remove element from the page.
Best regards
Tan Nguyen
Anh Tran
KeymasterHi Piet,
I've just released an update, have a nice day man and thanks again for your contribution!
Best regards
Tan Nguyen
Anh Tran
KeymasterHi Piet,
Thanks for installing and reporting that bug, you'll get a minor update within next 24 hours. Whilst waiting for that patch, you can try to disable Debugging in WordPress
Thanks and have a nice day,
Tan
Anh Tran
KeymasterHi zainsohail19, glad that the code works for you. I will fix the CSS issue in the next version of Tab extension. I will also answer your question on wp.org ๐
Anh Tran
KeymasterHi Sinusite,
Great question, I will implement update to get multiple field hide with same condition, currently, this version doesn't support but you can try this snippet for shorter and easier to update. Basically, assign hidden conditions to a variable called
$hidden_conditionand attach that condition to all of your meta boxes:$hidden_condition = ['hidden' => ['parent_id', '>', 0]]; foreach ( ['tagsdiv-maitreo', 'postimagediv', 'sbg_box'] as $metabox ) { $conditions[$metabox] = $hidden_condition; }Best Regards
Anh Tran
KeymasterI just found the problem. When you added columns, the total columns in one row must be exactly 12. In the code above, the last row of the About tab has only 8 columns. Here is the fixed code (I added a
custom_htmlfield, which doesn't output anything, it's just there to make sure total columns equals 12):Anh Tran
KeymasterAnh Tran
KeymasterI'm debugging the problem but haven't solved it yet. Give me more 3 days so I can dig deeper into each line of code.
August 17, 2015 at 8:23 AM in reply to: Combination 'MB Include Exclude' and 'Meta Box Show Hide' #1239Anh Tran
KeymasterHi Flikweert,
I think the problem is not those plugins. They work well together. Basically, the Include Exclude extension decides whether or not load the meta box in a specific page and the Show/Hide decides whether or not show/hide it via Javascript (the meta box is loaded in this case). So it's fine to use them together.
I guess the browser crashes because of another reason. Maybe there are a lot of JS or elements on the page. Or something else. Can you please give me more details to look into?
Anh Tran
KeymasterI would recommend using awesome plugin Admin Columns which is compatible with Meta Box for simple fields (not cloned or group).
Anh Tran
KeymasterHi bravebits,
Sorry for the long silence and thanks for downloading and reporting about that bug. We've just released an update which wiped out that bug and you can start using Conditional Logic with
image_advancedfield.The syntax is the same as other field, but just keep in mind that image advanced field will returns num of image, so field empty that means "0" image selected.
Example:
'hidden' => ['image_advanced_field_id', 0]or
'visible' => ['image_advanced_field_id', '!=', 0]Best regards
Tan Nguyen
Anh Tran
KeymasterCan you please re-download again? I updated all the files on both server and Gumroad.
Thanks.
Anh Tran
KeymasterJust updated the plugin with full support for Dashicons. Please update.
Thanks for the idea ๐
-
AuthorPosts
