feature: Add add-another field to the runner
Description
Add a new component that allows user to add multiple rows at a time in a single question
- Allows user to enter a title
- Add a single field or two fields at a time
- Optionally include help text
- Runner generates and saves items
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update
How Has This Been Tested?
Unit test
Checklist:
- [ ] My changes do not introduce any new linting errors
- [ ] I have performed a self-review of my own code
- [ ] I have commented my code, particularly in hard-to-understand areas
- [ ] I have made corresponding changes to the documentation and versioning
- [ ] My changes generate no new warnings
- [ ] I have added tests that prove my fix is effective or that my feature works
- [ ] New and existing unit tests pass locally with my changes
- [ ] I have rebased onto main and there are no code conflicts
- [ ] I have checked deployments are working in all environments
- [ ] I have updated the architecture diagrams as per Contribute.md
@JamesBoadi, I'm currently working on the first pass of this
Hey James, take a look at #850.
Are you able to create the designer side of this? at the minimum I would need an option to create a new page with repeatingFieldPageController.
This page should also should not allow more than 1 input component. worth giving it a try if this works with date parts field, but I doubt it, so please also restrict fields that render more than one (I think just date parts field, month parts field and address component).
here's a sample JSON sample for a repeatingFieldPageController
{
"path": "/which-languages-do-you-provide-a-service-in",
"title": "Which languages do you provide a service in?",
"controller": "RepeatingFieldPageController",
"components": [
{
"name": "languagesProvided",
"options": {
"hideTitle": true
},
"list": "languages",
"type": "AutocompleteField",
"title": "Language",
"hint": "List any languages you interpret or translate (apart from English)",
"schema": {}
}
],
"next": [
{
"path": "/what-services-do-you-provide"
}
]
},
Hey James, take a look at #850.
Are you able to create the designer side of this? at the minimum I would need an option to create a new page with
repeatingFieldPageController.This page should also should not allow more than 1 input component. worth giving it a try if this works with date parts field, but I doubt it, so please also restrict fields that render more than one (I think just date parts field, month parts field and address component).
here's a sample JSON sample for a repeatingFieldPageController
{ "path": "/which-languages-do-you-provide-a-service-in", "title": "Which languages do you provide a service in?", "controller": "RepeatingFieldPageController", "components": [ { "name": "languagesProvided", "options": { "hideTitle": true }, "list": "languages", "type": "AutocompleteField", "title": "Language", "hint": "List any languages you interpret or translate (apart from English)", "schema": {} } ], "next": [ { "path": "/what-services-do-you-provide" } ] },
Yes i'm halfway through creating it, so repeatingFieldPageController will show a preview of the component in the designer once a new page is created?
And should this feature be unique to one component or reusable across all input components?
so repeatingFieldPageController will show a preview of the component in the designer once a new page is created?
yes, should just look like a normal page. just that when you are creating a new one, you should be able to select repeatingFieldPageController.

And should this feature be unique to one component or reusable across all input components?
no. any number of repeatingFieldPageController can be created per form