Skip Navigation

[Resolved] How to filter a parent select list in CRED (based on a selected “grandparent”)

This thread is resolved. Here is a description of the problem and solution.

Problem:
How to create dependent select dropdown using CRED form

Solution:
There is no such feature available to add dependent dropdown to CRED forms. This feature is not supported by current CRED.

Relevant Documentation:

This support ticket is created 6 years, 7 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
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 2 voices.

Last updated by PaulS4783 6 years, 7 months ago.

Assisted by: Minesh.

Author
Posts
#676676

Hello.

I notice that the default CRED form in the Real Estate reference site shows "Agents" as a drop down select list.
Agents has a PARENT post relationship to Apartments.

In order to expose "State" on the form I need to also make it a PARENT post relationship to Apartments.
City has already a PARENT post relationship to Apartments.

My question, is there a way to ONLY show the City/s that are children of the State post type within this CRED form?
(State is by default a parent of City in the reference site).

hidden link

<div class="form-group">
        <label>[wpml-string context='cred-form-Add Apartment-353' name='state Parent']State[/wpml-string]</label>
    [cred_field field='_wpcf_belongs_state_id' value='' order='date' ordering='desc' required='true' select_text='--- not set ---' validate_text='state must be selected' class='form-control' output='bootstrap']
    </div>

    <div class="form-group">
        <label>[wpml-string context='cred-form-Add Apartment-353' name='city Parent']City[/wpml-string]</label>
    [cred_field field='_wpcf_belongs_city_id' value='' order='date' ordering='desc' required='true' select_text='--- not set ---' validate_text='city must be selected' class='form-control' output='bootstrap']
    </div>
#677295

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

No - unfortunately there is no native way available to display dependent drop down options based on dropdown selection.

#678276

How can we elevate this ticket to a "feature request"?

I imagine that the need for "nested select" fields in CRED is a pretty common use case scenario.