pex
29 Jun 2007, 2:16 AM
Hello,
I have build a form using HTML and I wrapped it in an Ext.form.Form - I then want to be able to load data into the form object by using form.load(). I have the following code:
HTML of the form
<form target="_self" id="personForm" name="personForm" method="post" action="/handler.php">
<ol id="formFields">
<li class="">
<label class="desc">Personal Details</label>
</li>
<li>
<span class="t">
<input class="text h" name="title" type="text"> <label>Title</label>
</span>
<span class="f">
<input class="text h" name="fname" type="text"> <label>First name</label>
</span>
<span class="f">
<input class="text h" name="lname" type="text"> <label>Last name</label>
</span>
</li>
</ol>
</form>
Wrap the form in an Ext.form object
this.formObj = new Ext.form.Form('personForm', {
waitMsgTarget: 'box-bdd'
});
Then i load the data into the form like this:
this.formObj.load({url:this.url, params:parms, waitMsg:'Loading Data'});
I get a good reply from the load (object contains 'success' and 'data' fields) however it just does not populate the form fields. Any idea why not and how to fix this? Thanks in advance!
I have build a form using HTML and I wrapped it in an Ext.form.Form - I then want to be able to load data into the form object by using form.load(). I have the following code:
HTML of the form
<form target="_self" id="personForm" name="personForm" method="post" action="/handler.php">
<ol id="formFields">
<li class="">
<label class="desc">Personal Details</label>
</li>
<li>
<span class="t">
<input class="text h" name="title" type="text"> <label>Title</label>
</span>
<span class="f">
<input class="text h" name="fname" type="text"> <label>First name</label>
</span>
<span class="f">
<input class="text h" name="lname" type="text"> <label>Last name</label>
</span>
</li>
</ol>
</form>
Wrap the form in an Ext.form object
this.formObj = new Ext.form.Form('personForm', {
waitMsgTarget: 'box-bdd'
});
Then i load the data into the form like this:
this.formObj.load({url:this.url, params:parms, waitMsg:'Loading Data'});
I get a good reply from the load (object contains 'success' and 'data' fields) however it just does not populate the form fields. Any idea why not and how to fix this? Thanks in advance!