How do I make the collections widget display at least one field by default?

1
0
-1

Hello,

Does anyone know how to set up the collections widget in the UI Designer so that one input field is displayed as the form loads? Currently, I have to manually press the button with a plus sign to add one input field, and I want 1 input field to already be shown when the page loads. I think this is because the Business Data Model doesn't allow me to set an attribute as multiple and mandatory.

Any help would be greatly appreciated.

1 answer

1
+1
-1
This one is the BEST answer!

Hello,

To do that, just add a value in your container variable.
Ex: your container use 'formInput.users' to populate.
So, in your formInput:
{
users:[ {name:""}]
}

Regards

Comments

Submitted by miguel.aguilera... on Wed, 01/08/2020 - 21:07

Thank you, this solved my issue

Submitted by bastien.laurent... on Thu, 01/09/2020 - 08:21
With pleasure
Notifications