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