Posted by mzafer on February 4, 2008 at 3:07am
Jump to:
| Project: | Address field for CCK |
| Version: | 5.x-2.1 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
Issue Summary
Hi Constantine,
Currently when the country to selected, the states are loaded and one of them is selected by default. Instead I have a need where the state should not be selected by default, but display "--select state--" as the first in the drop down and force the user to select the state. Any thoughts on how this can be done.
Thanks
ZM
Comments
#1
Patch the module as you like it. During creation of the drop down list, add --select state-- before you loop through the states. Then in validation, throw an error if the --select state-- item is selected. I look forward to your patch.
#2
#3
Would be better patching with empty string value (displaying --select state--) then throw error "is mandatory" ?
#4
Right. The displayed text doesn't have to match the returned value. Empty string is a logical choice. Og_fourm has all of my attention at the moment and so I can't get to this for a while.
#5
Issue more than 6 months old.