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

Question

Question

Is there a way to add nested checklists in forms?

asked on April 1, 2014

Hi,

 

Is there a way to create nested check lists in forms (not an "if" condition)? For example, recreate the following checklist:
 

 

0 0

Answer

APPROVED ANSWER SELECTED ANSWER
replied on April 2, 2014 Show version history

If all you want is the appearance of nesting, you can accomplish this with CSS. This CSS rule uses :nth-child, which is fairly recent and not supported in IE 8 or earlier.

 

Add the nested CSS class to your checkbox field, then add this rule to the CSS section of the CSS and JavaScript page.

 

.nested span:nth-child(n+2):nth-child(-n+4) {padding-left:25px;}

Some background: the input box for a checkbox is wrapped in a span tag that also includes its label. This rule targets the spans that are the 2-4th children of the parent element.

 

2 0
replied on April 2, 2014

Thank you Eric! this did the trick!

0 0
replied on April 3, 2014

You're welcome!

0 0

Replies

replied on April 2, 2014

I have thought of a way, but I do not think you would like it. 

 

You can use a section or a custom HTML field to make the top of the checklist and then make each item that needs a nested checklist the last item in the checklist. Then you add another checklist underneath that one and afterwards, add yet another checklist to complete the bottom options. If this is only for one nested checklist, you might want to consider moving that item to the bottom.

 

I am looking into another way that I thought of, but cannot say for sure yet as I have little experience manipulating the checklists in forms in this manner.

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

Sign in to reply to this post.