Creating a list within a form widget

Hi,

I’ve created a form to collect a lot of information in one object, one section of the form is to get the information of the address history over the last 3 years, I’ve had a question put to me if instead of having the current way I added it (people selecting how many additional addresses they’ve had from 0-5 and it appears that selected number, I added the additional address information 5 times in the object) and instead be able to essentially have a list within the form that people can add to as many times as they would require. Firstly, is this possible? If so, how would I go ahead and do this?

Thanks in advance

Hi Alex,

Thanks for asking. This sounds like a good use case for the List Edit widget. Prerequisite, you will need your object related to an address object via a to many relationship, just storing the properties for a singular instance.

This widget allows you to create a list with editable and submissible rows. You can set a minimum and maximum cap on the amount of rows that can be submitted for this widget and the data will be submitted with your form, inherently creating your one to many relationship at the same time.

Hopefully this helps.

Carl

Hi Carl,
Thank you for this, it has worked perfectly. I got an additional question on the back of this. When I submit the form I have it generate a pdf from a template with the main object being the data source, I’ve just tried to attempt to add this into the pdf but haven’t had any luck, would you be able to guide me how I would be able to add the data from the list edit widget into this pdf

Hi Alex,

Go into the template and you should have a panel on the right hand side. Depending on your setup you might not have this panel, in which case you could have to switch to “edit mode” and it will appear.

At the top of this panel you should see your base object you are familiar with that used to harbor all of your data. Below it you should see a second box which if you click the arrow on the right will show you the relation you set up off the back of Carl’s advice above. Once you select this relationship you are now telling Create you now could be showing any number of related things, in your case it would be the amount of addresses submitted via your form.

I would suggest trying a “Page include” on the original base object and then going down the relation to your addresses on this page include and do a “List by block” where you define a layout for 1 address and this will repeat with however many related records you have to your original form :slight_smile:

Try a few things and let us know how you get on,
Dan

Thanks for this information Daniel, in the end I was able to do it using a sub-template and has worked how I need it to