View Full Version : Put Picklist return into computed field ?!?!?!?!
intertchelo
24 Sep 2008, 3:25 PM
Dear All,
I'm use the "demos/picklist.html" page from extnd_b1.nsf for work with picklist in my form, and i'm can get works with the demo code with my view.
So, when the new document are composed in my form, i'm have one computed text field that should be filled by the picklist selection.
How can I put the selection in the picklist in the computed field ???
I'm need do +/- as in the client ;-)
it's possible ???
thx
intertchelo
25 Sep 2008, 1:17 PM
I'm could work fine with this code below, but only if the field "Projeto" is in Editable Mode, when i'm put the field in computed, i'm get the script error ('Ext.get(...).dom' is null or not an object), any one know how put the result in computed field ?
thx
var wrkspc = new Ext.nd.UIWorkspace();
wrkspc.PickList({
type: 'custom',
viewName : 'CtrlClientes',
title : 'TITULO',
prompt : 'PROMPT',
column : '0',
callback: function(val) {
Ext.get('Projeto').dom.value = val;
},
uiView : {showSearch : false, searchCount : 60, searchInPagingToolbar : false}
});
mth96a
26 Sep 2008, 7:13 AM
make the field editable, in the html attributes on the filed, add "ReadOnly", then it will show as a normal field, but they can not type in or change the values, but you can set the value of with js.
intertchelo
26 Sep 2008, 10:29 AM
Dear mth96a,
Thanks for you reply, it's works, if you see in the attachment it's impossible type ahead in the field or change data, the field only receive the result of picklist.
Bu as the field is editable the web show border as default editable field, it's possible show as computed field ???
Please see the screenshot..
Thank you .
jratcliff
26 Sep 2008, 2:13 PM
Yeah, this is a tough one to do out of the box. What might work better for you is to wrap your field in a div tag and give the div an id. Then, when you are in read mode you can write the value to the innerHTML of the div. If you need this data sent back to the server then you'll need a hidden field and have your code write the value there as well.
intertchelo
27 Sep 2008, 1:25 PM
Hi Jack,
did you have any example ?
thank you so much !
Powered by vBulletin® Version 4.1.5 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.