CiviCRM Community Forums (archive)

*

News:

Have a question about CiviCRM?
Get it answered quickly at the new
CiviCRM Stack Exchange Q+A site

This forum was archived on 25 November 2017. Learn more.
How to get involved.
What to do if you think you've found a bug.



  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Adding javascript to only show states for selected country in Advanced Search
Pages: [1]

Author Topic: Adding javascript to only show states for selected country in Advanced Search  (Read 786 times)

mhenning

  • Guest
Adding javascript to only show states for selected country in Advanced Search
May 28, 2010, 04:05:15 pm
I would like to improve the advanced search by only showing the states for the country selected.  I see this is how it works when you create a new contact and would like to port this functionality to the advanced search.

Any pointers as to what code/files I should look at and which advanced search files I need to modify?

Donald Lobo

  • Administrator
  • I’m (like) Lobo ;)
  • *****
  • Posts: 15963
  • Karma: 470
    • CiviCRM site
  • CiviCRM version: 4.2+
  • CMS version: Drupal 7, Joomla 2.5+
  • MySQL version: 5.5.x
  • PHP version: 5.4.x
Re: Adding javascript to only show states for selected country in Advanced Search
May 28, 2010, 10:50:13 pm

templates/CRM/Contact/Form/Search/Criteria/Location.tpl

we use the jQuery chainedSelect widget. might want to use that and check templates/CRM/common/stateCountry.tpl

to see the js needed. you can potentially inline it in the location tpl
lobo
A new CiviCRM Q&A resource needs YOUR help to get started. Visit our StackExchange proposed site, sign up and vote on 5 questions

Pages: [1]
  • CiviCRM Community Forums (archive) »
  • Old sections (read-only, deprecated) »
  • Developer Discussion (Moderator: Donald Lobo) »
  • Adding javascript to only show states for selected country in Advanced Search

This forum was archived on 2017-11-26.