I want to add elements like labels, field and other from the code creating a new form.
I try this but it didn't work:
- Code: Select all
function onAction(event) {
var sForm = "testForm"
history.removeForm(sForm);
controller.recreateUI();
// Get the form
var password = "ciao"
var myForm = solutionModel.newForm("asd",null,null,null,false,500,500)
myForm.newLabel('Test', 20, 20, 120, 30)
myForm.newLabel("ASDADASDASDASDASDASD",150,150,500,400).background='green'
myForm.newPassword(password,200,100,150,50)
}
I create a new empty form called "testForm", and when i click to the button i want to populate this form with my fields...how can i do this?
Thanks