Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Form integration and js API #1

Open
jedateach opened this issue Nov 26, 2012 · 1 comment
Open

Form integration and js API #1

jedateach opened this issue Nov 26, 2012 · 1 comment

Comments

@jedateach
Copy link
Member

This module should provide some useful forms / fields for making use of this module.

When country changes, an ajax call is made to the server to get states. If response is empty, then state is a text field, otherwise it is a dropdown field.

Note that this enforces the use of javascript. A form-only approach would require 'set' and 'update' buttons next to fields, which would refresh the page. Probably too difficult to achieve nicely.

@jedateach
Copy link
Member Author

I have a simple implementation working, where the region field gets updated when you select a country. There are still a number of issues to deal with however:

  • Set region by id, rather than name. What about countries with no region?
  • Validation - is it now broken for that field?
  • Handle pre-populated data
  • 3rd-level handling?
  • Show spinner & disable during changeover

Introduced in 73dff61

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant