If javascript is disabled the state/provide field never shows up. If this field is required the form fails.
Would be nice to at least load the default countries field (probably often US state) DOM element on page load, then replace it if something else is selected.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | profile_location-state_province_js_fallback-1404540-4.patch | 3.91 KB | iamEAP |
Comments
Comment #1
johnhanley commentedA previous project description revision included the following:
"This module is dependent on a small inline snippet of JavaScript (jQuery) to perform its show/hide magic and does NOT degrade for users who have JavaScript disabled in their browser. If degradation is important to you, please do not use this module."
I agree some sort fallback would be ideal, but given my current professional and personal obligations this modification is unlikely to happen. Patches gladly accepted.
Please reopen this issue if you or someone would like to submit a patch.
Comment #2
johnhanley commentedComment #3
doublejosh commentedThanks.
Totally fine. Let's leave open if/when I create this patch :)
Comment #4
iamEAP commentedHere's a patch that takes care of the issue.
This adds a third field profile_territory_fallback. The field is displayed by default and hidden via JS so that if JS is enabled, the module functions as usual, but if not, the user stills sees something.
I chose to include both state and province values in the field options, separated by a blank "--- select a province ---" option.
Added some logic to the profile_location_validate_handler so that:
Comment #5
johnhanley commented@iamEAP, thanks for the patch!
I'm swamped right now and don't have time to adequately test, but maybe the OP has time.
@doublejosh, what say you?
Comment #6
doublejosh commentedI work with Eric on the same site. We can bang on it and have other staff test a bit for sure.
Comment #7
johnhanley commentedClosing due to Drupal 6 end-of-life cycle.