Conditional layout | Community
Skip to main content
New Participant
March 12, 2020
Question

Conditional layout

  • March 12, 2020
  • 1 reply
  • 3595 views

Hello.

I'm a new user and I'm wondering if it's possible to have some "conditional" Layout.

 

I have a form, divided into several section (subforms)

Each "line" may contain 2 or 3 fields (depend on the information requested)

This layout allow to make the form shorter but all is a bit squeezed. It's ok for most of the people, but a bit inaccessible for some.

I'd like to have an "option" (Checkbox for exemple) that change the layout to a 1 field by "line"

 

My idea was to give instruction to each field "If checkbox is checked, have a width of XXX (full width) and a reserve of XXX", (Forcing the next field to go under it)

 

If checkbox is unchecked, "have a width of XXX and a reserve of XXX" (Allowing the next field to place itself on the right)

 

I know it's something possible in a webpage but I have no idea if it is on AEM designer and how to do it.

 

If you have any idea, it will be helpfull

 

Thank you.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.

1 reply

Mayank_Gandhi
Employee
March 12, 2020

Why would you like to give end user the privileges to change layout on the fly? I assume you are creating PDF?

 

A possible solution can be to have 2 subform, one with 1 field in single line and other with 3 fields in single line. Show these sub-form based on the checkbox selection. 

Asuryan37Author
New Participant
March 12, 2020

The idea is to give the opportunity to the end user to chose the layout he feels more confortable with.

It's a bit unusual I guess.

 

Your solutions is definitely an easy one. However, duplicate each field means double the work (and error) when we need to update it.