Setup a clear function in a toolbar

I setup a form to get input data.

I will setup a function that it can clear up all data in the each field before save. It is back to initial screen.

This function I will use a botton in a toolbar.

I want to ask this method ?

  1. create a toolbar: docs.dhtmlx.com/doku.php?id=dhtm … mlxtoolbar
  2. create form: docs.dhtmlx.com/doku.php?id=dhtm … xform_init
  3. apply event handler to you toolbar button to clear the form:

toolbar.attachEvent("onClick", function(id){ if (id == "clear_form"){ myForm.clear(); } });

Darya,

I can get the result !

Thanks for your help !

Ivan

You are welcome!