Skip Navigation

[Resolved] CRED – parent-child drop-down relationship

This support ticket is created 7 years, 3 months ago. 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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
- 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 12:00 – 17:00 -
- 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 18:00 – 21:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

Tagged: 

This topic contains 19 replies, has 2 voices.

Last updated by Bochnacki 7 years, 2 months ago.

Assisted by: Noman.

Author
Posts
#556495

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello,

1. No, I don't think there is any other way. And that is something you need to search within CRED files at your own, this is very custom requirement outside of Toolset features, unfortunately we can’t consult on it. Contact recommended developers if you need help with this: https://toolset.com/consultant/

2. Post meta should be useful I think.

- CRED API Hooks: https://toolset.com/documentation/programmer-reference/cred-api/
- Some shortcodes here: https://toolset.com/documentation/user-guides/cred-forms-for-child-content/
- Programmer reference for examples & help: https://toolset.com/documentation/programmer-reference/

Thanks

#556586

1. I'm not sure what is a custom requirement? To have custom action and filter hooks inside yours plugin code? I'm shocked that this kind of plugin have only so little of hooks.

2. You think?

Can I ask to assign this topic to some developer?

#556650

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Basically I meant to say that you have to give it a try and see how it goes. And I am talking about this feature “parent-child drop-down relationship in CRED form”. This is what not available in Toolset features and needs custom coding (or we can say custom requirement).

1. What you have implemented so far, the previous steps that I told have you implemented some of those? If not then please implement something and please provide links with detail info / screenshots for that.

2. Where you are stuck now, on which particular step? Please provide links with detail info / screenshots.

3. Please provide a simple and easy to understand example of the thing that you want to achieve, just to be more clear on this.

Although this is out of our official support policy, but I would like to give it a deeper look and see if I can provide you with some custom code. For that I need to request temporary website WP-admin and FTP info for your site to debug further and to help in resolving this. Your next answer will be private which means only you and I have access to it.

=== Please backup your database and website ===

✙ I would additionally need your permission to de-activate and re-activate Plugins and the Theme, and to change configurations on the site. This is also a reason the backup is really important.

✙ Please add the Links to the related pages and backend Edit Screens that are using for this task. Thanks

#558592

Noman
Supporter

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hello Bochnacki,

cred_field shortcode >> Parent dropdown is being generated from this file:

cred-frontend-editor\vendor\toolset\toolset-common\toolset-forms\classes
Filename: class.eforms.php
Line # 950
Function name: select

Please take a look at that function and code, you should be able to pass additional arguments for this shortcode too with custom code.

To get to know about which CRED Hooks are executed on the page, I suggest you a good way to detect those, please use following plugin & its addon:
- Debug Bar: https://wordpress.org/plugins/debug-bar/
- Debug Bar Actions and Filters Addon: https://wordpress.org/plugins/debug-bar-actions-and-filters-addon/

==> Our doc explain more about this strategy (section: Troubleshooting): https://toolset.com/documentation/programmer-reference/toolset-hooks/

==> This will give you enough information about CRED field shortcode and available filters that you can use to modify things after hooking into it.

More information about cred_field shortcode and other shortcodes is here:
https://toolset.com/documentation/user-guides/cred-shortcodes/#cred_field

If you still can’t get what’s needed or the provided info is not sufficient, please let me know and I will forward that to 2nd tier for further review. Thanks

#563136

Problem solved differently. The Toolset tools were insufficient, or I could not implement them.
This is not convenient because you have to spit all brands and models (the list was made when typing brands and models as a CSV file, but you need to rewrite and add ID) but it works.

Here I show JSON and JS code: https://stackoverflow.com/questions/45847857/populate-dropdowns-by-id-from-json