Is possible to have an expandable text field in a drop down list option (@livecycle)?

joslug89

05-06-2017

I'm trying to create a form to answer questions with a drop down menu. Most of the question can be answer with a "yes" or "no", but I would like to create a third option "other" so the person can add a comment, note, etc. Is possible to have an expandable text field in a drop down list option? I know I can allow custom text entry but when I preview the form the text field doesn't expand as the text field do.

Accepted Solutions (0)

Answers (7)

Answers (7)

_Bruce_Robertson

MVP

07-06-2017

Hi,

A TextField has a presence property, which you can set to "visible" or "invisible", so in the change event of the dropdown you could have this JavaScript code;

     TextField1.presence = (xfa.event.change === "Other") ? "visible" : "invisible";

Then in the initialise event of the dropdown you could have this code to set it the first time.

     this.execEvent("change");

Which just calls the change event to set the presence the when the form is open.

Here is a sample

https://sites.google.com/site/livecycledesignercookbooks/home/PleaseSpecify.pdf?attredirects=0&d=1

Regards

Bruce

joslug89

06-06-2017

Yes!, that works for me... how I can do that? How I can configure my form to have that field invisible until the "other" option is chosen?