PDA

View Full Version : Override values before posting



seek
2 Feb 2010, 6:35 AM
There is a way to override values of Ext.form.* controls before submit data?
I need it here: http://www.extjs.com/forum/showthread.php?p=432804#post432804

Taking idea from sample sources, I think to add this piece of code


if(edit.form){
edit.form = Ext.getCmp(edit.form).getForm();
edit.form.on('beforeaction', function(f, action){
if(action.type == 'submit'){
edit.value = currencyNumericValue;
}
}, edit);
};
in this.init function.
But I'm using ExtJS in non-invasive mode, so edit.form is null, because my form is self generated by ApEx (Oracle Application Express), and I don't know if is sage interfere... :s

Thanks
Seek

seek
3 Feb 2010, 3:23 AM
Someone can give me a little help?

Thanks in advance
Seek

seek
15 Feb 2010, 3:30 AM
Hello,
I try to use this code, converting the standard HTML form:

function ExtThisForm(formId, options){
var frm = new Ext.form.BasicForm(formId, options );
};and after create a listener "before action", to override the value posted by edit (Ex.form.NumberField)


edit.form = Ext.getCmp("wwvFlowForm");
if (edit.form) {

edit.form.on('beforeaction', function(f, action){
if (action.type == 'submit') {
edit.value = currencyNumericValue;
}
}, edit);
};edit.form must be the "ExtJsized" main form, but it appear as original....
Where I'm wrong?

Thanks again
Seek