-
23 Apr 2008 4:24 PM #1
[OPEN][2.*/3.0] Standard submit of form does not set form action in dom
[OPEN][2.*/3.0] Standard submit of form does not set form action in dom
Looks like a bug, where I have to set the action attribute of the form in dom before submitting or there will be no form action assigned and the form post will fail:
does the same in FF and IE, and I'm using the ext-base.js; easy work around but this should probably get fixed so other's don't run into the same thing.Code:items: [{ xtype:"button", text: 'Find', minWidth: 100, style:'padding:0px 0px 0px 140px;margin:0px 10px 30px 10px', handler: function(){ air_rt_form.getForm().el.dom.action=air_rt_form.getForm().url; air_rt_form.getForm().submit(); } }] // end inside items array
thx! (Ext is the BEST man)
-
24 Apr 2008 3:50 AM #2
To expand, where the BasicForm config standardSubmit is used to request a browser submission of the form as opposed to an Ajax submission, the url config should be stamped into the generated DOM form element as the action attribute value.
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
-
24 Apr 2008 3:53 AM #3
I suggest this fix (to which I, herinafter known as the herinafter do perperually grant rights, notwithstanding... (continued page 94)):
Code:initEl : function(el){ this.el = Ext.get(el); this.id = this.el.id || Ext.id(); if(this.standardSubmit){ this.el.dom.action = this.url; } else { this.el.on('submit', this.onSubmit, this); } this.el.addClass('x-form'); },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
-
24 Apr 2008 3:55 AM #4
Although this thread might provide a different option if <form> as body is implemented: http://extjs.com/forum/showthread.php?t=28125
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
-
25 Apr 2008 12:25 AM #5
Other fix proposition
Other fix proposition
How about this other fix in 'FormPanel' (Form.js) in the 'onRender' method:
It works for my use case...Code:var o = { tag: 'form', action : this.url, // <-- Fix here method : this.method || 'POST', id : this.formId || Ext.id() };
-
25 Apr 2008 1:25 AM #6
Yes that will work for you, but the fix must really go into BasicForm because that is what gets submitted, and it can be used independently of FormPanel.
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
-
25 Apr 2008 1:27 AM #7
-
25 Apr 2008 2:46 AM #8
No, it doesn't create the form, it wraps a form. But the point remains that it can be used without a FormPanel, so in this case, it must still honour the url config by setting the action attribute if standardSubmit is specified.
(I know, if they're using a BasicForm to wrap an existing DOM form, they're likely to have set action, but BasicForm has to be sure)
(Yes, of course... I missed the "dom" bit. I'll edit)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
-
16 Sep 2008 5:29 AM #9
Any plans to implement a patch for this in future version?
For now, one possible solution has been added to the FAQ:
http://extjs.com/learn/Ext_FAQ_Forms#Standard_Submit
Suggest to patch the source, or supplement the Docs to alert people what needs to be done.MJ
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
-
9 Nov 2008 1:20 AM #10
Shameless BUMP!
When is this ancient bug with a very simple fix going to be fixed? The bug was reported in 2.1 and got sent out in 2.2!
People are still being bitten by this when using standardSubmit: trueSearch 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
