-
2 Jun 2008 5:44 AM #1
allowBlank:false, on html editor not working ?
allowBlank:false, on html editor not working ?
why function allowBlank:false, on my fieldset is not working ? this is my code :
form with fieldset :
this is the html editor as an input field :Code:... formReplyWeb = new Ext.FormPanel({ frame: true, baseCls: 'x-panel', labelAlign: 'left', labelWidth: 100, url: '/TA/data/webdata.jsp?type=3&id='+selectedWebDetailId, method: 'POST', waitMsgTarget: true, items: [ new Ext.form.FieldSet({ title: 'Tulis pesan baru', iconCls: 'webEdit', autoHeight: true, autoWidth: true, buttonAlign:'right', defaultType: 'textfield', items: [ webSender, webSubject, webProductID, webCreatedDate, webMessage, webReply // <----- this is the html editor field ], buttons: [{ text: 'Kirim', handler: sendWEB },{ text: 'Reset', handler : resetWebFSData },{ text: 'Tutup', handler : function() {winReplyWeb.hide();} }] }) ] }); ...
what wrong with that ??Code:... var webReply = new Ext.form.HtmlEditor({ id:'webReply', name: 'webReply', fieldLabel: 'Pesan balasan ', width:500, height:200, allowBlank: false, // <--------------- not working / functioning enableFormat:false, autocomplete:'off', enableSourceEdit: false, enableColors : false, enableFont : false, //labelWidth: 5, labelSeparator:'' }); ...

-
11 Aug 2009 10:41 AM #2
fix:
Code:Ext.override(Ext.form.HtmlEditor, { markInvalid: function(msg){ if(!this.rendered || this.preventMark){ return; } msg = msg || this.invalidText; switch(this.msgTarget){ case 'qtip': this.iframe.qtip = msg; this.iframe.qclass = 'x-form-invalid-tip'; Ext.get(this.iframe).addClass(this.invalidClass); break; } return Ext.form.TextArea.superclass.markInvalid.call(this, [msg]); }, clearInvalid: function(){ if(!this.rendered || this.preventMark){ return; } switch(this.msgTarget){ case 'qtip': this.iframe.qtip = ''; Ext.get(this.iframe).removeClass(this.invalidClass); break; } return Ext.form.TextArea.superclass.clearInvalid.call(this); }, validateValue:function(){ if(this.allowBlank==false){ var value =this.getRawValue(); value = value.replace(/ /gi,""); value = value.replace(/<br>/gi,""); value = value.trim(); if(value != ''){ this.clearInvalid(); return true; } else{ this.markInvalid("This field is required.") return false; } }else{ this.clearInvalid(); return true; } } }); Ext.form.HtmlEditor.prototype.listeners={ sync: function(t,html){ t.validateValue(); } };
-
31 Mar 2010 6:09 AM #3
This FIX don't work in IE? There is some solutions?
Thanks
Roberto
-
4 Nov 2010 9:12 AM #4
what's wrong
what's wrong
did not work in version 3.3 extjs, what's wrong?
-
5 Sep 2011 10:41 PM #5
"allowBlank: false" is not working
"allowBlank: false" is not working
I have the same problem with allowBlank. I have field and allowBlank: false does not work.
It does not become required field.Code:{ xtype : 'field', id: 'ozelKod', allowBlank: false, fieldLabel : 'Özel Kod', name : 'ozelKod' }
Edit: I have solved. Instead of field use textfield.Last edited by darkhorni; 5 Sep 2011 at 10:51 PM. Reason: solved
-
18 Jan 2012 11:34 AM #6
The HTMLEditor does not support allowBlank, which is extremely frustrating..
-
7 Nov 2012 3:13 AM #7
That's Ext JS
That's Ext JS
That's why I won't use Ext JS for my works. Yeah, I know that we can extend it and do tens of other things with it. But for simple things like this, you end up struggling.


Reply With Quote