I am loading state select option through ajax for the selected country and by default the state option is
none
with the below reference stackoverflow issue asked few days b4,
how to set multi select CCK Field type for country state city with geoname module?
http://goo.gl/Xpwu0
I couldn't find any answer till now, so tried my own way by
if country selected, based on the country the state have to listed from geoname api so i did it through ajax and appended to the list correspondingly to city.
final开发者_运维百科ly after submitting i got error
An illegal choice has been detected. Please contact the site administrator.
The form system automatically validates the selected value of a select and only allows those which are defined in '#options'. There is no way around that in D6, in D7, there is a flag to disable that.
You need to use #ahah and rebuild the form on the serverside. The following modules might be useful to you:
- http://drupal.org/project/ahah_helper (for building it yourself)
- http://drupal.org/project/hierarchical_select (Maybe you can extend that...?)
精彩评论