Dynamic form , adding a inputfield onclick event

Dear Mendix users, Is it possible to add a inputfield widget onclick while you're active in the form. So for example I have a register form and I want to add a adress to the form. There is a button, and when I click on it it will add a inputfield widget.
3 answers

Create a entity Address and draw a line from Address to Register? in your domain model.. add a datagrid to display this reference and create the forms. Et voila you can add as many addresses as you like.


You have a couple of options.

1) You can make lines visible with a condition. So make a boolean InputField. Create the line in your form where the user can input the adress and make it conditional visible based on this boolean. Now set this boolean when the user clicks a button which triggers the microflow setting this boolean.

2) Use the button to trigger a microflow which shows a popup form where you can edit the adress.




Hmm oke I understand , but if I do this I limit the user to add as many adresses as they want. Is there a possibilty to lets say if a user has 9 adresses. Like for example a company and they want to add all 9 adresses. Howe could I do this ?