Hello. I need help. I create the type of post "hottours" associated with travel. And I also create 2 types of fasting, which will be in relation to him as a "parent-child": "countries" and "cities". After that, I display all this data in the form of "cred" to create posts like "hottours", and I need to make sure that when choosing a particular country, I could choose only from the cities of this country, i.e. I have two fields of the "select" type of the country and city in the "CRED" form, and if I choose the country "Germany", it is necessary that in the second field of the choice of cities there are only the cities of Germany. How can I do it? I apologize in advance if I have difficultly explained. Thank you.
hidden link
1) yes
2) yes
3) yes
4) yes
In this case, in the example I have two countries, Abkhazia and Australia in the first drop-down list, and 4 cities (resorts) in the second drop-down list (Алис-Спрингс and Аделаида are Australia, and Гечрипш and Гагра are Abkhazia). The example has not yet completed all cities, until I solve this problem with CRED.
Look at 2 drop-down lists at the very top, where it's premature ---no set---
Thx.
Parent-child drop-down relationship in CRED form is not available in Toolset features and needs custom coding (or we can say custom requirement).
We need to build parents dropdown using custom code to make it dependendent. I have made sample html for country city dropdown. You can get jQuery code from there and you need to make custom dropdown for parents with similar structure as we have in html file.
And I can in this form through the field
"[cred_field field='_wpcf_belongs_XXX_id' value='' order='date' ordering='desc' select_text='--- not set ---' class='form-control"
bring to the drop-down list not the names of countries, but let's say some other user-defined field of the post type.
For example, now this function displays a list of countries, because I entered the name of the country in "post_title", but can I output another field in the same list? Another field, which also belongs to the type of post of "XXX".
The fact is that I do not particularly understand your proposal, since my skills in code programming are not so good. I bought this plug-in for this purpose, so that I can access the code directly, and more appeal to design as a designer. Thanks for the help, and I apologize for the inconvenience.
And can I in this form through the field
"[cred_field field='_wpcf_belongs_XXX_id' value='' order='date' ordering='desc' select_text='--- not set ---' class='form-control"
bring to the drop-down list not the names of countries, but let's say some other user-defined field of the post type?
For example, now this function displays a list of countries, because I entered the name of the country in "post_title", but can I output another field in the same list? Another field, which also belongs to the type of post of "XXX".
....sorry, I wrote the sentence incorrectly. it was question
Sorry, we do not enter some other field instead of post title. We can achieve it my making custom select box using custom shortcode. Please provide temporary access (WP-Admin and FTP Login info) to your site (preferably staging site), so that I can look into your setup and check the issue.
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 provide CRED back-end and front-end link.
✙ Please let me know field that you want to use instead of post title.