Can't get form handle

Hello!,

After using a form inside layout I can’t get the handle of form.

CODE:

dhx.ui({ id: ‘app’, view: ‘layout’, height: 482, width: 322,
rows: [
{ view: ‘layout’, type: ‘wide’,
rows: [
{ view: ‘toolbar’, type: ‘MainBar’,
elements: [
{ view: ‘button’, label: ‘<< Voltar’, id: ‘control_button_2’, align: ‘left’ },
{ view: ‘label’, label: ‘Vendas’, id: ‘control_label_2’ }
], id: ‘toolbar_2’
},
{ view: ‘form’, scroll: 0,
elements: [
{ view: ‘layout’, type: ‘wide’,
rows: [
{ view: ‘text’, label: ‘Código’, labelPosition: ‘left’, labelAlign: ‘left’, id: ‘control_text_4’ },
{ view: ‘label’, label: ‘Label’, popup: ‘’, click: ‘’, id: ‘control_label_4’ },
{ view: ‘layout’, type: ‘wide’, id: ‘layout_6’,
cols: [
{ view: ‘button’, label: ‘Procurar’, id: ‘control_button_5’ },
{ view: ‘button’, label: ‘Salvar’, id: ‘control_button_6’,click:“adicionar” }
]
},
{ view: ‘list’,
type: { width: 300, height: 22, margin: 0, padding: 10 }, id: ‘list_3’, datatype: ‘json’, url: ‘./data/sample_list.json’
}
], id: ‘layout_5’
}
], id: ‘form_2’
}
], id: ‘layout_2’
}
]
});

EXAMPLE:

var form = $$(‘form_2’).getValues(); // (never works)
var mycode= form.control_text_4;

Forget ! I found the solution.

You can use

$$(“control_text_4”)
or
$$(‘form_2’).elements.control_text_4