Hello,
I am working on a Site based on Toolset Reference Site 'Real Estate'
I have 3 CPTs to define the location of a House:
- States
- Municipalities, and
- Zones
All relationtionships have been created accordingly.
I have created a CRED Form called 'Add House':
In the CRED form I have added 3 control-forms to select the State, Municipality and Zone where the 'House' belongs.
What I need now is to cascade the dropdown:
- When a user selects a 'State', I need to filter the next dropdown ('Municipalities') to display only municipality values belonging to that 'State'
- After the user selects the 'Municipality' I need to filter the next dropdown ('Zones') to display only zones values belonging to that 'Municipality'.
How could I achieve this result, creating a Cascading Dropdown?
<div class="form-group">
<label>[wpml-string context='cred-form-Add House-356' name='State Parent']State[/wpml-string]</label>
[cred_field field='@state-house.parent' class='form-control' output='bootstrap' select_text='--- not set ---']
</div>
<div class="form-group">
<label>[wpml-string context='cred-form-Add House-356' name='Muni Parent']Muninicipality[/wpml-string]</label>
[cred_field field='@municipality-house.parent' class='form-control' output='bootstrap' select_text='--- not set ---']
</div>
<div class="form-group">
<label>[wpml-string context='cred-form-Add House-356' name='Zone Parent']Zone[/wpml-string]</label>
[cred_field field='@zone-house.parent' class='form-control' output='bootstrap' select_text='--- not set ---']
</div>