Results 1 to 2 of 2

Thread: Form: allowOnlyWhitespace doesn't affect formBind buttons w/o also allowBlank.

    Looks like we can't reproduce the issue or there's a problem in the test case provided.
  1. #1
    Sencha User
    Join Date
    Dec 2012
    Vote Rating

    Default Form: allowOnlyWhitespace doesn't affect formBind buttons w/o also allowBlank.


    Ext version tested:
    • ext-4.1.1a-gpl
    Browser versions tested against:
    • Chrome 23.0.1271.101
    DOCTYPE tested against:
    <!DOCTYPE html>
    • On form fields, setting allowOnlyWhitespace to false does not trigger buttons with formBind set to true to enable or disable based on the field validation. You must also set allowBlank to false, despite the fact that the documentation says setting allowOnlyWhitespace to false also sets allowBlank to false.
    Steps to reproduce the problem:
    • Create form with one field with allowBlank and allowOnlyWhitespace set to false and a second field with only allowOnlyWhitespace set to false.
    • Create a button on the form with formBind set to true.
    The result that was expected:
    • Both fields should be validated to have valid text before the button is enabled.
    The result that occurs instead:
    • Entering text for the first field (with both allowOnlyWhitespace and allowBlank set to false) enables the button.
    Test Case:

    Ext.onReady(function() {
        var form = Ext.create('Ext.form.Panel', {
          plain: true,
          items: [
              xtype: 'textfield',
              fieldLabel: 'Field 1',
              name: 'field1',
              allowBlank: false,
              allowOnlyWhitespace: false
              xtype: 'textfield',
              fieldLabel: 'Field 1',
              name: 'field2',
              allowOnlyWhitespace: false
          buttons: [
              action: 'reset',
              text: 'Reset Form'
              action: 'create',
              text: 'Create',
              formBind: true
        var win = Ext.create('Ext.window.Window', {
          title: 'Form',
          minWidth: 300,
          minHeight: 200,
          layout: 'fit',
          items: form


    Additional CSS used:
    • only default ext-all.css
    Operating System:
    • OS X 10.8.2

  2. #2
    Sencha User evant's Avatar
    Join Date
    Apr 2007
    Sydney, Australia
    Vote Rating


    This isn't a bug, that config didn't exist in 4.1.1a, it was introduced in 4.1.2.

    To confirm, you can check out the 4.2 beta.
    Twitter - @evantrimboli
    Former Sencha framework engineer, available for consulting.
    As of 2017-09-22 I am not employed by Sencha, all subsequent posts are my own and do not represent Sencha in any way.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts