1. #1
    Ext JS Premium Member
    Join Date
    Sep 2010
    Posts
    12
    Vote Rating
    1
    donnhann is on a distinguished road

      0  

    Default Set or get form id from FormPanel

    Set or get form id from FormPanel


    I need to either set, or get the auto-generated id for the form object inside of a FormPanel. When I set an id on FormPanel, this id is acutally set on a div, and not on the form. The id "adhocForm" below is the id set in FormPanel. I need the id "ext-gen11" set on the form for some legacy javascript code. I have been through the api and have tried a variety of things, including the finds (findByType, etc), but can't seem to get access to the internal form's id. Any advice on either setting (preferred) or getting the id for the <form> created by FormPanel?

    Code:
    <div id="formDiv">
    <div style="width: 600px;" class=" x-panel x-form-label-left" id="adhocForm">
    <div style="-moz-user-select: none;" id="ext-gen12" class="x-panel-header x-unselectable">
    <span id="ext-gen14" class="x-panel-header-text">Ad Hoc Form</span>
    </div>
    <div id="ext-gen13" class="x-panel-bwrap">
    <form style="padding: 5px 5px 0pt; width: 590px; height: auto;" class="x-panel-body x-form" method="POST" id="ext-gen11">
    <input value="true" class=" x-form-hidden x-form-field" size="20" autocomplete="off" id="ext-comp-1007" name="adhocPageDesignator" type="hidden">
    .
    .
    .
    The code used to generate above is:
    Code:
    var generateReport = new Ext.form.FormPanel({
    autoHeight: true,
    frame:false,
    id: 'adhocForm',
    itemId: 'adhocFormItemId',
    bodyBorder: true,
    title: 'Ad Hoc Form',
    bodyStyle:'padding:5px 5px 0',
    width: 600,
    tbar: toolbar,
    items: [{
    xtype: 'hidden',
    name: 'adhocPageDesignator',
    value: 'true'
    .
    .

  2. #2
    Sencha User laurentParis's Avatar
    Join Date
    Aug 2010
    Location
    paris
    Posts
    246
    Vote Rating
    2
    laurentParis is on a distinguished road

      0  

    Default


    use formId
    Code:
    var generateReport = new Ext.form.FormPanel({
      autoHeight: true,
      frame:false,
      id: 'adhocForm',
      formId: 'myFormId',
      ...

  3. #3
    Ext JS Premium Member
    Join Date
    Sep 2010
    Posts
    12
    Vote Rating
    1
    donnhann is on a distinguished road

      0  

    Default


    Thanks, that worked!

Similar Threads

  1. How do you set a FormPanel's encoding type to multipart/form-data?
    By Jul in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 3 Feb 2010, 5:20 AM
  2. Set FormPanel TextBox Value
    By rehanazher in forum Ext 3.x: Help & Discussion
    Replies: 4
    Last Post: 6 Aug 2009, 12:45 AM
  3. Replies: 2
    Last Post: 24 Mar 2009, 1:26 AM
  4. how to set formpanel width
    By lalit_ce in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 10 Oct 2008, 2:47 AM
  5. how to set formPanel values
    By swathi.bogolu in forum Ext 2.x: Help & Discussion
    Replies: 10
    Last Post: 20 Feb 2008, 11:40 AM

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi