Skip Navigation

[Resolved] form "CRED"

This support ticket is created 6 years, 9 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.

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)

This topic contains 8 replies, has 2 voices.

Last updated by Noman 6 years, 9 months ago.

Assisted by: Noman.

Author
Posts
#621177

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.

#621444

Noman
Supporter

Languages: English (English )

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

Hello Alexander,

Thank you for contacting Toolset support. Can you please confirm some points before moving ahead:

1. Country and City are CPTs?
2.Country and City are parents of ‘hottours’ CPT?

3. In ‘hottours’ CRED form, country and city are displayed as parent dropdowns?

4. When user select country ‘Germany’ then second parent should display just display cities of selected country?

If you have setup hottours CRED form, please share frontend link.

Thank you

#621581

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.

#621584

hidden link
Sorry, its new link.
Thank you.

#621946

Can you help me, Noman??

#622008

Noman
Supporter

Languages: English (English )

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

Hello Alexander,

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.

For parent dropdown, you can follow following ticket:
https://toolset.com/forums/topic/dynamic-select-input-in-a-cred-form/#post-569070

Thank you

#622051

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.

#622055

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

#622214

Noman
Supporter

Languages: English (English )

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

Hello Alexander,

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.

Thank you