3 Replies Latest reply on Sep 3, 2010 10:32 AM by Arun Ganesh

    need dynamic form save button

    welcomecan Level 1

      hai friends,

      i am creating a dynamic form .i need how to save data dynamically.

      dynamic form save button

       

       

       

       

      <fx:Script>
              <![CDATA[

      //dataist  arraycollectiion data .

                     [Bindable] public var dataist:ArrayCollection = new ArrayCollection( [
                      { spkName:customer Name', dataName:'customer_name'},
                      { spkName:customer address', dataName:'customer_add'},

                      { spkName:customer state', dataName:'customer_state'},

                      { spkName:customer city', dataName:'customer_city'}])

       

      public var frmitem:FormItem;

      public var txtInput:TextInput;

       

      public function init():void

      {   
         // loop is executed 4 times 
        for(var i:int = 0; i < dataist.length(); i++)

        {

          var formlabel:String= lst[i].spkName;

          var textvalues:String= lst[i].dataName;


              frmItem = new FormItem();
              frmItem.direction = "horizontal";
              frmItem.label = formlabel;

       

              txtInput = new TextInput();
              txtInput.id= textvalues;
              frmItem.addChild(txtInput);

              userInfoForm.addChild(frmItem);

        }

      }