form field type 'enum' url does not change runtime #2516
Unanswered
lech-summary
asked this question in
Q&A
Replies: 1 comment 1 reply
-
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.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
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