We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1778
    • 659 Posts
    Hello
    All is in the title... For a component I have a modx-window it's code is fairly simple something like
    Mediaman.window.SoundAdd = function(config){
        config = config || {};
        Ext.applyIf(config,{
            id: 'mman-win-addsound',
            title: 'Add a new sound',
            width: 600,
            height: 400,
            url: Mediaman.config.connectorUrl,
            baseParams:{
                action: 'mgr/sounds/soundAdd',
                submitEmptyText: false // tried here but also in the field properties, and in the window call from the tbar button
            },
            fileUpload: true,        
            fields: [{
                xtype: 'textfield',
                name: 'title',
                maxLength: 30,
                maxLengthText: 'maximum 30 !',
                fieldLabel: _('title'),
                emptyText: 'your title',
                anchor: '50%'
              },{... etc}
          ]
    });
        Mediaman.window.SoundAdd.superclass.constructor.call(this,config);
    };
    Ext.extend(Mediaman.window.SoundAdd,MODx.Window);
    Ext.reg('mman-win-addsound',Mediaman.window.SoundAdd);
    


    But the empyText is submitted with the form. I tried 'submitEmptyText: false' ( I tried everywhere in the field properties, in the baseParams, in the call from the toolbar button), nothing to do, the emptyText is ever submitted... Any idea on how to set the 'submitEmptyText: false' to have it to work ?

    Cheers
      • 40045
      • 534 Posts
      Unfortunately this seems not to be passed in any way to the Ext.form.Action object, suggested (easy) fix for the core code in modx.window.js was submitted here: https://github.com/modxcms/revolution/pull/12036