Create "Add More" Button on Form

mergesort33
Tera Contributor

Hello,

I would like to create a set of three text boxes that allows a user to enter information on a form. Then, the user should be able to click "Add More", and a second set of three text boxes will appear. The user should be able to do this to add N sets of three text boxes (although realistically, probably no more than four). Is there a way to do this?

Thank you! 

1 ACCEPTED SOLUTION

Tom Sienkiewicz
Mega Sage

Hi, if this is for a Catalog Item - there's a ready solution - Multi Row Variable Sets.

For a regular backend form, you would usually use a formatter with a dedicated UI Macro, rendering the 3 fields as well as any Add, Remove etc. buttons. You would also add a large text field to store whatever was input in this macro in a stringified JSON format. It is farily easy then to perform all sorts of business logic with this input.

For a Service Portal form, this should also be possible although trickier, you will need to map formatters to widgets, or possibly clone and modify an OOTB widget.

 

View solution in original post

2 REPLIES 2

Tom Sienkiewicz
Mega Sage

Hi, if this is for a Catalog Item - there's a ready solution - Multi Row Variable Sets.

For a regular backend form, you would usually use a formatter with a dedicated UI Macro, rendering the 3 fields as well as any Add, Remove etc. buttons. You would also add a large text field to store whatever was input in this macro in a stringified JSON format. It is farily easy then to perform all sorts of business logic with this input.

For a Service Portal form, this should also be possible although trickier, you will need to map formatters to widgets, or possibly clone and modify an OOTB widget.

 

Thank you - the multi-row variable sets fit our needs perfectly! Appreciate you taking the time to respond.