1 Reply Latest reply on Nov 10, 2012 8:50 PM by rush_pawan

    How do I make a drop down list required?

    spiderobert

      I'm trying to make a form that has two drop down boxes that I need to make required. currently, no matter what I put as the first item or in the initial values, it won't detect when someone hasn't selected anything, because it just counts the first item as being valid. Is there a way to set the first item as not being valid? I've tried setting the value of the first item to:

      null = --please select --

      which doesn't work. Does anyone know how to do this?

      If you need more info please let me know.

        • 1. Re: How do I make a drop down list required?
          rush_pawan Level 4

          Based on above scenario i expect that you are using OOTB form components (like drop down etc...).

           

          If yes, then you can achieve it easly by setting up constraint value as required under "constraint" tab and dont initialize "default value" under "initial values" tab.

           

          If above will not help as per your requirement. Then try below.

           

          The form (drop down component) configured using 'selection' widget (xtype) so you can configure this property as not null by setting 'allowBlank' property as below.

          name                 type                value

          allowBlank         boolean           false

           

           

          I hope this will help you. Let me know if it doesn't work