-
21 Feb 2009 6:42 AM #1
Empty value of form field after submit
Empty value of form field after submit
In fp = new Ext.FormPanel i have this:
also I have Save button:Code:{ xtype: 'hidden', id: 'flat_id', name: 'flat_id', value: '' }
In console.log I see right current value of grid row indexCode:buttons: { text: 'Save', id: 'saveBtn', disabled: true, handler: function(){ if(fp.getForm().isValid()){ Ext.getCmp('flat_id').value = Grid.getSelectionModel().selections.keys[0]; console.log("success on %o", fp.getForm().items); fp.getForm().submit({ url: 'upload.php', success: function(fp, o){ imgds.reload(); } }); } } }
But in POST I see empty flat_id
Is this bug or my fault?
-
21 Feb 2009 7:03 AM #2
Setting a property of a Javascript object will not affect the contents of an HTML input field.
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642
-
21 Feb 2009 8:05 AM #3
-
21 Feb 2009 8:14 AM #4
Yes, that's one of the many ways to skin this cat!
Search the forum: http://www.google.com/coop/cse?cx=01...%3Az7of1ufqccu
Read the docs too: http://extjs.com/deploy/dev/docs/
Scope: http://extjs.com/forum/showthread.ph...642#post257642


Reply With Quote
Thanks! 