Navigation überspringen

[Gelöst] Dependent Custom Field

This support ticket is created vor 3 years, 4 months. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Zeitzone des Unterstützers: Asia/Hong_Kong (GMT+08:00)

Dieses Thema enthält 2 Antworten, hat 2 Stimmen.

Zuletzt aktualisiert von fahimS-2 vor 3 years, 4 months.

Assistiert von: Luo Yang.

Author
Artikel
#2542547

Tell us what you are trying to do?
I have a custom field group called Plan. In that group I have checkboxes. The options on that checkboxes are Free, Yearly, Monthly, Lifetime. I have another checkboxes named Status with options Active, Inactive. Now I want to avail the Status chekcboxes only when I select Lifetime in the Plan checkboxes. How can I do that?

Is there any documentation that you are following?

Is there a similar example that we can see?

What is the link to your site?

#2543921

Hello,

Toolset Data-Dependent does not support custom checkboxes field, as a workaround, you can switch to a custom taxonomy, and use it as the condition.

See below test site:
Login URL:
versteckter Link

1) Create a custom Hierarchical taxonomy "Plan":
versteckter Link
Add terms into above taxonomy:
versteckter Link

2) Edit your custom field group:
versteckter Link
in section "Settings for test group 1", option "Appears on", set the condition as below:
- Post Type(s): Your custom post types
- Term(s): Yearly
- when ALL conditions are met

3) Create a post:
versteckter Link
in section "Plan", enable term "Yearly", save the post and refresh browser, you will be able to see the custom field group of step 2)

More help:
https://toolset.com/course-lesson/conditionally-display-custom-fields-in-wordpress-backend/#conditionally-display-a-group-of-custom-fields

#2544801

My issue is resolved now. Thank you!