How to Generate form dynamically using mendix?

1
I am trying to rebuild an app from .Net in Mendix.  I know how to configure the domain model based on the structure I want and how to design a static form based on the configured domain model I have.  But one of the functionalities I need is to dynamically generate a form or dynamically add textboxes to the form. Is there a way to do it in mendix?
asked
3 answers
1

Right click on an entity in a domain model and select Generate overview pages will allow you to create overview and detail pages for one or more entities in your domain model. The overview pages will comprise data grids with some default buttons (e.g. New, Edit, Delete) and a search. The details page will be populated with input fields for the attribute members of your entity, and reference selectors for associated objects.

This is about it with regards to automated page generation based on the domain model. However, if you add a data widget (e.g. data grid) to a page and define the entity, Mendix will ask if it should populate the widget for you.

answered
1

Hi Jayson,

Indeed there is a way to do it. You need to link an entity with 1-* association to your from entity. E.g.:

 

Afterwards you add a button "Add Note” and link a MF where you create Note object with refreshing in client. On your page you could use ListView with the datasource of Note associating from MyForm.
Try to experiment with this implementation until you reach something that suits your solution

answered
0

Hi Jayson,

You might want to look into conditional visibility on elements on a page. That’s the easiest way to change the page dynamically. You can add boolean attributes (e.g. ShowTextField) to your domain model to base visibility on, and change the values with OnChange events on other fields. 

If you provide a more elaborate description of want you want to build, we can help you further. 

Best,

Fiemke

answered