change form field to readonly

Hi Webix team, in the snippet http://webix.com/snippet/0be82892 I want to change the form field email to readonly, but it does not work. Do you have any advice?

Use

$$("myform").elements["email"].config.readonly = true;
$$("myform").elements["email"].refresh();

http://webix.com/snippet/151c6aac

Hi Listopad, a lot of thanks, it works great

Hi @Listopad
How can I set refresh() all myform element instead one by one ?

webix.ui.each
https://snippet.webix.com/3b99911c

@finzaiko yes, and please note that

  • webix.ui.each can be used to iterate all child views of a component, so you will need to check the configuration of each view for the name to distinguish form inputs from other views;
  • form.elements is an object that stores hash of all UI elements that are recognized as form inputs, so you can iterate through these elements as well.

@Listopad
Can you please provide the snippet for form?

https://snippet.webix.com/5iev9wrw

https://forum.webix.com/discussion/6276/iterate-form-elements

@Jacekk015

Thanks :slight_smile: