20 Mar 2012 3:30 PM #1
Unanswered: Ext.field.Select - force a selection
I was wondering if there was a way to force a user to select an item in the list, rather than it defaulting to the first record after the associated store has loaded.
So when the store loads, the select field would just become enabled, but the placeholder text would remain the same, and the value would be null in order to enforce the 'required' validation rule.
I suppose one option would be to insert an empty record into the first position of the store after it finishes loading, but I don't like the idea of polluting my store with hackery like this.
21 Mar 2012 5:07 AM #2
- Join Date
- Mar 2007
- Gainesville, FL
- Vote Rating
So the list that pops up on desktop/tablet you want a default option in there?Mitchell Simoens @SenchaMitch
Sencha Inc, Senior Software Engineer
Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/
Need more help with your app? Hire Sencha Services firstname.lastname@example.org
Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!
When posting code, please use BBCode's CODE tags.
21 Mar 2012 7:18 AM #3
No. I'm talking about the options.
I just dont want the select field to auto-select the first record in the store once it loads. I want the value to remain null and the placeholder text to stay put.
Example: "Select a State" instead of it auto-selecting "Alaska" after the store is loaded.
27 Mar 2012 8:18 AM #4
That list wont pop up as I'm using the option: usePicker: 'true'
This website wont be displayed for tablets, only phones.