Dynamic UI Problem

Hello,

I built a multiview, inside i put a form. The content of the form is changed dynamically according to the user actions. After a several content replacement , the form content is lost. The form does not display its content.

I use this technique

var formContent1 = [ {…}, …]
var formContent2 = [ {…}, …]

var form ={ view:form, id:“formId”, elements: forContent1}

//For init the application gui
var theAppUI ={view:window, … elements :[ {…}, form,…{}]}
dhx.ui(theAppUI);

//to upadte form content :
if (userInput == 1)
dhx.ui( formContent1, $$(‘formId’))
else if (userInput == 2)
dhx.ui( formContent2, $$(‘formId’))

//Changes made several times : form content is not displayed

So could you explain me what happens, and what should I do ?

Thanks you. Have a nice day.

Normally this is unexpected result ( you must be able to change form content as many times as necessary ), if it possible - please provide any kind of sample where it can be reconstructed.

Also, you can use a different solution, create a multi-view with few separate forms inside, and instead of form reloading, just show the necessary form view from the set.

Thanks you stanislas.
I use the multiview solution.
Have a nice day.