You are viewing limited content. For full access, please sign in.

Question

Question

Display a section title when a section is repeated (Forms)

asked on May 20, 2015

Hello,

In one of our forms, we have a large section that is set up as a repeating collection. When a form submitter clicks the link to repeat the collection of fields, we would like a new header (section title) to be displayed for the repeated section that helps define what those fields are for.

Is there a way to do this?

 

Thanks,

Eric R

0 0

Answer

APPROVED ANSWER
replied on May 20, 2015

Here's an example form that I have:

It starts with a section called "Primary Applicant Information" with fields for the first name, last name, and address. Then I have a checkbox that the submitter checks if they want to add joint-applicant information. After the checkbox is a collection called "Joint-Applicant Information" and inside the collection, I have a custom HTML field with

<h4>Joint-Applicant</h4>

and then fields for the first name, last name, and address.

I then configured a field rule so that the "Joint-Application Information" collection only appears when the Joint-Application checkbox is checked.

Lastly, I added some custom CSS such that in the repeating collection for joint-applicants, the header is numbered.

body {
    counter-reset: h4counter;
}
h4:before {
    content: counter(h4counter) ".\0000a0\0000a0";
    counter-increment: h4counter;
}

The end result looks like the following:

0 0

Replies

replied on May 20, 2015

If you don't need the functionality of a Forms section (ability to expand or collapse the section, make it read only, etc.) then you can just use a custom HTML field with something like

<h4>Section Header</h4>

Here's an example of what it looks like after adding a few of the collections

0 0
replied on May 20, 2015 Show version history

Thanks Alexander. A custom HTML section for the header would work for this purpose but where am I telling it how to name it with something different?

The section title needs to be different for the repeated collection... not the same as what the original section title was. All of yours in the example appear to be the same.

0 0
replied on May 20, 2015 Show version history

For clarity.... here is a mockup of what I am trying to achieve. The first section is called "Primary Applicant Information". Once the form submitter clicks the link for "Add Joint-Applicant", the collection is repeated but now the section header says "Joint-Applicant Information" for the new collection of fields. Hopefully this makes sense of what we are trying to do.

 

0 0
APPROVED ANSWER
replied on May 20, 2015

Here's an example form that I have:

It starts with a section called "Primary Applicant Information" with fields for the first name, last name, and address. Then I have a checkbox that the submitter checks if they want to add joint-applicant information. After the checkbox is a collection called "Joint-Applicant Information" and inside the collection, I have a custom HTML field with

<h4>Joint-Applicant</h4>

and then fields for the first name, last name, and address.

I then configured a field rule so that the "Joint-Application Information" collection only appears when the Joint-Application checkbox is checked.

Lastly, I added some custom CSS such that in the repeating collection for joint-applicants, the header is numbered.

body {
    counter-reset: h4counter;
}
h4:before {
    content: counter(h4counter) ".\0000a0\0000a0";
    counter-increment: h4counter;
}

The end result looks like the following:

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.