Results 1 to 4 of 4

Thread: Ext.field.Select - force a selection

  1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    39
    Answers
    5
    Vote Rating
    0
      0  

    Default 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.

    Any ideas?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,551
    Answers
    3931
    Vote Rating
    1271
      0  

    Default

    So the list that pops up on desktop/tablet you want a default option in there?
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  3. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    39
    Answers
    5
    Vote Rating
    0
      0  

    Default

    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.

  4. #4
    Sencha User
    Join Date
    Jan 2012
    Posts
    39
    Answers
    5
    Vote Rating
    0
      0  

    Default

    That list wont pop up as I'm using the option: usePicker: 'true'

    This website wont be displayed for tablets, only phones.

    Any ideas?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •