I have a complex layout with a form nested deeply in it. I’m trying to call the getValues() method on the form but cannot seem to get a reference to the form object. I have a snippet with the code here: http://webix.com/snippet/a936d18a
I need to get the data from the form when the user presses the “Search” button/
Any help would be greatly appreciated as I cannot seem to get data from the form.
Thank you for your reply. This has partially solved my problem.
The getValues() now works if I use the reference $$(“searchForm”).
However, when I attempt to reference any of the other widgets in my UI, something like:
$$(“searchresults”).clearAll();
I get an error similar to the following error:
Uncaught TypeError: Object [object Array] has no method ‘clearAll’
This call DOES work in the attached snippet, but it does not work in my application.
(Note: my application is integrated into a larger application, so I realize there may be other things that are interfering with it ).
if there is a way to create an explicit reference to part if the UI
The $$ operation do this, it returns the reference to the object by object’s ID. Also, you can use result of webix.ui, it returns the top object of created UI
It possible that you are using some other lib on the page, and this lib redefines $$ operator ( jQuery UI for example ), in such case you need to use webix.$$ instead of $$ ( it is the same command, but you can be sure that webix.$$ is not redefined by any third party library )