Hi,
In my case the captcha is used in an summary-form.
Before or after loading the captcha a bunch of other data has to be load also.
This other data is loaded by the currentFormPanel.load()-method:
Code:
var currentFormPanel = Ext.getCmp('formSummary');
currentFormPanel.load({
url:Ext.getDoc().dom.location
,method:'POST'
,waitMsg:'Loading...'
,params:{_eventId_loadData:'load'}
,success: currentFormPanel.onLoadSuccess
});
I get a "f.clearInvalid is not a function"-error in the ext-all-debug.js (line 40838).
My relevant source code is:
Code:
FormSummary = Ext.extend(FormSummaryUi, {
initComponent: function() {
FormSummary.superclass.initComponent.call(this);
// FormSummary is generated with ExtBuilder. It uses a placeholder element which is replaced in
// the initComponent-method by the captcha
this.placeHolder0.replaceWith({
xtype:'recaptcha',
name:'recaptcha',
id:'recaptcha',
fieldLabel: ' ',
publickey:'mypublickey'
});
}
/**
* Form onRender override
*/
,onRender:function() {
// call parent
FormSummary.superclass.onRender.apply(this, arguments);
// loads form data after initial layout
this.on('afterlayout', this.onLoadClick, this, {single:true});
} // eo function onRender
/**
* Load click handler
*/
,onLoadClick:function() {
var currentFormPanel = Ext.getCmp('formSummary');
currentFormPanel.load({
url:Ext.getDoc().dom.location
,method:'POST'
,waitMsg:'Loading...'
,params:{_eventId_loadData:'load'}
,success: currentFormPanel.onLoadSuccess
});
// any additional load click processing here
} // eo function onLoadClick
...
If I remove the onLoadClick() method which loads my summary data, the captcha works fine.
How can I load my summary data and the captcha in one form?
Thanks in advance, for any help.