Repeatable fields

Hi, I need to create repeatable fields. For example:

How many children do you have? If the answer is 2, then Name and DOB needs to appear twice.

Thank you

Good Morning,

There are two approaches you could take here.

The first would be to have as you have suggested a question How Many children?, followed by Child Name 1, Child Age 1 etc.

You can then use dependencies to hide each child field, for example for Child 1 Name you would hide the field when Number of Children < 1, for Child 2 Name when Number of Children < 2 etc. This would allow the correct fields to appear as the number increased, however this would be limited to the number or properties you created in advance in your object.

A better approach might be to create a related object for storing Children, and use an edit list to allow N number of children to be added.

Please let me know if you have any further questions.

1 Like

Hi Adam,

I was thinking of using dependencies, its simple but laborious.

"A better approach might be to create a related object for storing Children, and use an edit list to allow N number of children to be added. " I’m not sure how to do this.

If you have an example, it would be much appreciated.

Thank you

The dependencies worked. Thank you very much.

Create an object that will contain your Children.

Relate your children object to your parent object, in this case Booking

Pagebuilder Options
If this is for administrative purposes a List Edit Widget may be sufficient, you can tick the Allow add/delete button in settings so that an Admin user can add or edit the list of children.

You’ll likely want to add this as part of the parent booking form so you’ll want the list edit to be related to a widget group for the parent.

If this is for use by the general public, a standard list widget with a pop-up panel to add Children may be more appropriate than the list edit table above.

Hope this clarifies things for you.

Thank you very much. Really appreciate your help.

If you have time, could you please also tell me how to create calculated fields as default in a field? I posted it in Forum.

2 numeric fields populated, and a third field displaying a calculated amount. for example

A = 4
B = 2
C = 4/2 = therefore displaying a result of 2

Please see my response here:

Hi Adam, Thank you for the above. But its so hard to get my head around it.

I have another calculation I need to add to a form:

if({Proposal}=‚ÄėCommercial or non residential‚Äô && {Floor_space} >0 && {Floor_space}<=200 && {Type_advice}=‚ÄėFull standard‚Äô,239,
if({Proposal}=‚ÄėCommercial or non residential‚Äô &&{Floor_space}>=201 && {Floor_space}<=‚Äė1000‚Äô && {Type_advice}=‚ÄėFull standard‚Äô,536,
if({Proposal}=‚ÄėCommercial or non residential‚Äô &&{Floor_space}>=1001 && {Floor_space}<=‚Äė2000‚Äô && {Type_advice}=‚ÄėFull standard‚Äô,775,
if({Proposal}=‚ÄėCommercial or non residential‚Äô &&{Floor_space}>=2001 && {Floor_space}<=‚Äė3000‚Äô && {Type_advice}=‚ÄėFull standard‚Äô,1131,
if({Proposal}=‚ÄėCommercial or non residential‚Äô &&{Floor_space}>=3001 && {Floor_space}<=‚Äė5000‚Äô && {Type_advice}=‚ÄėFull standard‚Äô,1669,
if({Proposal}=‚ÄėCommercial or non residential‚Äô &&{Floor_space}>=5001 && {Floor_space}<=‚Äė10000‚Äô && {Type_advice}=‚ÄėFull standard‚Äô,2975,
if({Proposal}=‚ÄėCommercial or non residential‚Äô &&{Floor_space}>=‚Äė10001‚Äô && {Type_advice}=‚ÄėFull standard‚Äô,6664,0)))))))

And I I’ve tried composites, rules and subsets, but just cannot get my head around it.

Is there any chance you could explain this on Teams?



Sorry for the late reply, but I’ve been creating Liberty Create forms that were on a different application.

For the calculation above I made a subset:

and then created a Rule:

Then added it to the page:

Not sure if there’s a better way of doing it.

Morning Kalpana,

You could achieve this in form using a fragment callback and a combination of fragment_presenter.get_values(); to pick up the user selected Proposal, Floor Space and Type_Advice values.

Use the logic given above and return the correct value using fragment_presenter.set_value();

You will need to set an event against the Proposal, Floor Space and Type_Advice fields and then set the same event to trigger refresh on the answer field containing the callback. This will ensure the field is recalculated when changes are made to the feed values.

Caution: If you are using this to generate a billing figure that will be used to charge the customer, this approach should not be used. This should only serve to provide immediate feedback to the user as to the expected charge and the figure also calculated independently in the back end.

Thank you Adam.

There are calculations to create a total calculated amount.