form field type 'enum' url does not change runtime #2516
Replies: 2 comments 2 replies
-
Since 2,0 - combo, list & enum controls are different and better. Once the control (object) has been instantiated changes must be made using the control's w2field object. For your example above: Field2.w2field.options.url = 'server/'+this.getValue('Field1')[0].id}}); I use this functionality to query the w2field.options.items property when other dropdown controls change. For example: this.get('moldid').w2field.options.items = app.moldid.filter(molds => molds.toolingid === toolingid); Sorry for late reply but I just saw your post. Hope this helps. |
Beta Was this translation helpful? Give feedback.
-
Oh... |
Beta Was this translation helpful? Give feedback.
-
good day
I have a form (w2form). Have two 'enum' type fields.
Field1 url is defined during creation of form. Field2 url is set same as Field1 but needs to be changed dependent on Field1 value.
I have
onChange: function(event){
event.onComplete=function(){
this.set("Field2", {options: {url: 'server/'+this.getValue('Field1')[0].id}});
this.refresh();
}
This changes the Field2.options.url to desired one. But http request is still executed based on initially set url (not modified).
Same setup works on 1.5. On 2.0 don't.
Please help with solution.
w2ui -rules :).
Lech
Beta Was this translation helpful? Give feedback.
All reactions