When a form has repeating groups with dynamics in them, I would like to reproduce the dynamics in the PDF by excluding different components in different entries in the repeating group.
I have a form with many repeating groups, where each group contains its own dynamics. Example:
If "Annet" is chosen, a textbox appears where user can fill in a description:
In the PDF, I did not find a way to implement this. So the component for "Beskrivelse av annet format" is always visible even if "Annet" is not chosen:
How do you want it solved?
I want to configure this in PdfHandler. Perhaps we could add a "{0}" to the string of components in repeating groups, similarly to how it is handled in RuleConfiguration. Would also need a way to access indices of the field which triggers dynamics.
Alternative solutions
It is already possible to loop through entries in a repeating group in PdfHandler since it is a list, so a possible solution is to add functionality for passing an index to layoutSettings.Components.excludeFromPdf. For example by adding an index to the component name string.
This leaves more work for the developer of the app.
@ingunnjv commented on Wed Feb 02 2022
What needs to be solved?
When a form has repeating groups with dynamics in them, I would like to reproduce the dynamics in the PDF by excluding different components in different entries in the repeating group.
I have a form with many repeating groups, where each group contains its own dynamics. Example:
If "Annet" is chosen, a textbox appears where user can fill in a description:
In the PDF, I did not find a way to implement this. So the component for "Beskrivelse av annet format" is always visible even if "Annet" is not chosen:
How do you want it solved?
I want to configure this in PdfHandler. Perhaps we could add a "{0}" to the string of components in repeating groups, similarly to how it is handled in RuleConfiguration. Would also need a way to access indices of the field which triggers dynamics.
Alternative solutions
It is already possible to loop through entries in a repeating group in PdfHandler since it is a list, so a possible solution is to add functionality for passing an index to layoutSettings.Components.excludeFromPdf. For example by adding an index to the component name string. This leaves more work for the developer of the app.