Repeater (PRO only)

Basic example

Form

    Address {{rep-1_index}}

    Street address:
    City:
    Country:

    Form Code

    [repeater rep-1 add "add additional address" remove "remove address"]
    <fieldset><legend>Address {{rep-1_index}}</legend>
    Street address: [text* street]
    City: [text* city]
    Country: [text* country]
    </fieldset>
    [/repeater]
    [submit]

    Email Body

    <strong>Thank you for filling out these addresses:</strong>
    [rep-1][rep-1:index] : [street], [city], [country]<br />[/rep-1]

    Edit this form in the form tester

    Advanced example

    The folowing features can be tweaked:

    • Minimum number of repetitions (default 1) – example: min:1
    • Maximum number of repetitions (default 200) – example: max:10
    • Initial number of repetitions (default 1) – example: initial:2
    • Add button text (default: “Add”) – example: add "Add another address"
    • Remove button text (default: “Remove”) – example: remove "Delete last address"

    It’s also possible to add groups inside the repeater.

    Take a look at the example code, it should make everything clear.

    Form

      address:

      Street address:
      City:
      Country:

      This is my: homebusiness

      VAT number:

       

      Form Code

      [repeater rep-1 min:1 max:4 add "Add address" remove "Remove address" ]
        <fieldset>
          <legend>address:</legend>
          Street address: [text* street]
          City: [text* city]
          Country: [text* country]
      
          This is my: [radio radio-type default:1 "home" "business"]
          [group group-vat]VAT number: [text* vat][/group]
        </fieldset>
      [/repeater]
      &nbsp;
      [submit]

      Email Body

      Thanks you for filling out these addresses:
      
      [rep-1]
      [street], [city], [country] ([radio-type])[group-vat]
      VAT: [vat][/group-vat]
      --------------------------------------[/rep-1]

      Conditional Fields (Text)

      show [group-vat] if [radio-type] equals "business"