Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Floating field value based on dropdown selection (gender)

Avatar

Level 3

Hi, I'm creating a form that will have various fields, dropdowns etc where the responses will populate a range of floating fields in a letter. I would like to have a dropdown for gender (male/female) and if selected, will either populate in the letter as 'he' or 'she'. Is this possible?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

Here's a couple of ways of doing this in this sample https://sites.google.com/site/livecycledesignercookbooks/home/HeShe.pdf?attredirects=0&d=1

The Male/Female drop down can have a bound value of he/she, which means we can reference the value directly without going though any calculation.  If there's a lot of places where he/she needs to be substituted then you can simplify things by referencing the form field directly, though this does require editing the XML, but if you don't you'll end up with a hidden field for every occurrence.  Or you could edit the XML Source and change the reference to the same id of the one floating field.  There are examples of both in the linked sample above.

Regards

Bruce

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

Here's a couple of ways of doing this in this sample https://sites.google.com/site/livecycledesignercookbooks/home/HeShe.pdf?attredirects=0&d=1

The Male/Female drop down can have a bound value of he/she, which means we can reference the value directly without going though any calculation.  If there's a lot of places where he/she needs to be substituted then you can simplify things by referencing the form field directly, though this does require editing the XML, but if you don't you'll end up with a hidden field for every occurrence.  Or you could edit the XML Source and change the reference to the same id of the one floating field.  There are examples of both in the linked sample above.

Regards

Bruce

Avatar

Level 3

Worked perfect - thanks for that Bruce!