| (Really) dynamic form fields? [message #703425] |
Wed, 27 July 2011 11:01  |
Beat Schwarzentrub Messages: 39 Registered: November 2010 |
Member |
|
|
Hello
Is it possible to create form fields on the fly, when form is already open?
I am aware of the method AbstractCompositeField.injectFieldsInternal(List<IFormField>), but this method is only executed once during the initialization of the GroupBox. In my case, the number and the type of fields to inject is not known at that time. There is a SmartField on the form and when the user chooses a value from it, a service is called that then returns a list of field descriptions. These field descriptions should then be transformed to form fields inside a group box.
It is my current understanding that this is not possible. Can someone please confirm that, or give an example how it could be done? (Current workaround: Generate a sufficiently large bunch of fields for each type and make only those visible that are needed, change labels etc... But that's not really dynamic, is it?)
Thank you very much.
B.
|
|
|
| Re: (Really) dynamic form fields? [message #718604 is a reply to message #703425] |
Wed, 24 August 2011 16:06  |
Adrian Moser Messages: 66 Registered: March 2011 |
Member |
|
|
Hi Beat
What about using a table on that form with an editable column, and another column for the field label? It is possible to create a field of any type in the cell when it is edited. And since it is a table, you can have unlimited rows (with fields).
Adrian
|
|
|
Powered by
FUDForum. Page generated in 0.01836 seconds