Skip to Content Skip to Menu

Fields in interdependent / country field sets query for zip

  • crauley
  • crauley
  • OFFLINE
  • Posts: 26
  • Thanks: 2
  • Karma: 0
9 years 6 months ago - 9 years 6 months ago #277270 by crauley
Hi,
I want to create a field with a query that controls the query of another field.

In this case like this:

I have 1 field set as query drop down (country) and 1 field also set as query drop down(zip code). Planed is, when a user choose its country the field zip code should be refreshed and display a query of the zip codes of its country.

I guess its possible with auto action plugin but I dont know witch function and trigger to use. Also I guess its necessary to use conditions for this.

Has anybody an idea?
Last edit: 9 years 6 months ago by crauley.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 49441
  • Thanks: 8467
  • Karma: 1465
9 years 6 months ago #277276 by krileon
Yes that's possible, but the second field will not update until the next page load. There is no ajaxing of the options so it's not going to query again each time you change the country field. The query supports substitutions so you can substitute in the value of another field as needed.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

  • crauley
  • crauley
  • OFFLINE
  • Posts: 26
  • Thanks: 2
  • Karma: 0
9 years 6 months ago #277283 by crauley
Is it not possible to reload page via auto action after a user set a "country" in this case. Thats what I ask myself?

When page will load after choosing, does it same like skip to next page?

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 49441
  • Thanks: 8467
  • Karma: 1465
9 years 6 months ago #277321 by krileon
Reloading the page won't do anything. The form needs to submit, store the field value you selected, then reload so the second query can use the new value through substitutions. So they need to edit the field and save their profile then go back to edit their profile to see the change.

There are plans to implement ajax updating of query select fieldtypes, but for now there is no such functionality. I've added a feature ticket to look into implementing this in a future release.

forge.joomlapolis.com/issues/5761

CB Auto Actions can not help you here. Additional code is needed in CB Query Field for this to work.


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum