-
25 Nov 2007 1:16 PM #1
[2.0rc1][CLOSED] emptyText is submitted
[2.0rc1][CLOSED] emptyText is submitted
When I submit a form, the emptyText values of textareas are submitted as well. This seems kinda unlogical to me, and I think it was not meant to be either if I have a look at Field.js
-
25 Nov 2007 7:07 PM #2
I think this has been discussed before, with Jack's answer being that it is the developer's responsibility to clear that out prior to submission. Although I could be remembering something else...

-
26 Nov 2007 12:41 AM #3
Hmm maybe I asked about this before :P
But if you have a look at Field.js:
And I don't really see the point of ever sending it anyway.Code:/** * Returns the raw data value which may or may not be a valid, defined value. To return a normalized value see {@link #getValue}. * @return {Mixed} value The field value */ getRawValue : function(){ var v = this.rendered ? this.el.getValue() : Ext.value(this.value, ''); if(v === this.emptyText){ v = ''; } return v; }, /** * Returns the normalized data value (undefined or emptyText will be returned as ''). To return the raw value see {@link #getRawValue}. * @return {Mixed} value The field value */ getValue : function(){ if(!this.rendered) { return this.value; } var v = this.el.getValue(); if(v === this.emptyText || v === undefined){ v = ''; } return v; },
-
26 Nov 2007 9:01 AM #4
See these threads for more info
http://extjs.com/forum/showthread.php?t=8029
http://extjs.com/forum/showthread.php?t=10600Tim Ryan
Read BEFORE posting a question / BEFORE posting a Bug
Use Google to Search - API / Forum
API Doc (4.x | 3.x | 2.x | 1.x) / FAQ / 1.x->2.x Migration Guide / 2.x->3.x Migration Guide
-
26 Nov 2007 12:38 PM #5Sencha - Community Support Team
- Join Date
- Mar 2007
- Location
- Frederick MD, NYC, DC
- Posts
- 16,169
- Vote Rating
- 28

Jay Garcia @ModusJesus || Modus Create co-founder
Ext JS in Action author
Sencha Touch in Action author
Get in touch for Ext JS & Sencha Touch Touch Training
We are also working on Video-based Sencha Touch training: Check it out here.
-
17 Nov 2008 10:22 AM #6
Just cross linking this thread to a doc suggestion (to help anyone falling into this thread in future):
http://extjs.com/forum/showthread.ph...750#post251750MJ
API Search || Ext 3: docs-demo-upgrade guide || User Extension Repository
Frequently Asked Questions: FAQs
Tutorial: Grid (php/mysql/json) , Application Design and Structure || Extensions: MetaGrid, MessageWindow


Reply With Quote
I remember this one vividly.