2 Replies Latest reply on Aug 24, 2010 10:32 AM by Subeesh Arakkan

    Hide items in form

    jfb00 Level 3

      Hi All,

      I have a form with multiple items, base on my conditions I want to hide and show some items. i can do this using visible state but the visible items don't take the empty place of the hide items.

      i try autoLayout="true" but doesn't work.

      It's a way to do this?

      tks

       

      Johnny

       

       <mx:Form id="myForm" defaultButton="{mySubmitButton}" autoLayout="true">

              <mx:FormItem label="Zip Code"
                  labelStyleName="myFormItemLabelStyle">
                  <mx:TextInput id="zipCode" visible="false"/>
                  <mx:TextInput id="State" visible="true"/>
              </mx:FormItem>
              <mx:FormItem label="Phone Number">
                  <mx:TextInput id="phoneNumber"/>
              </mx:FormItem>
         
              <mx:FormItem>
                  <mx:Button label="Submit" id="mySubmitButton"
                      click="processValues(zipCode.text, phoneNumber.text);"/>
              </mx:FormItem>
         
          </mx:Form>