Textfield hidden and visibility based on condition

Avatar

Avatar

rindangc6329106

Avatar

rindangc6329106

rindangc6329106

10-05-2017

Hello expert, I'm new on working with adobe livecycle designer, here I have a requirement to display certain value of a text field based on another textfield's value. Here is the scenario, I have 3 text fields, and the value are gotten from input data, let say textfield1, textfield2, and textfield3 If the value of textfield3 is null then textfield1 is invisible/hidden and textfield2 is displayed, but if the value of yextfield3 is not null, then the condition is reversed, I have tried to use the below script to meet the first condition (the value of textfield3 is null then textfield1 is invisible/hidden and textfield2 is displayed) but it doesn't work anymore, if (FormQuoteNotification.Page2.page2.Subform3.nama2.rawValue == null || FormQuoteNotification.Page2.page2.Subform3.nama2.rawValue == "")then FormQuoteNotification.Page2.page2.Subform3.nama1muncul.presence="visible"; else FormQuoteNotification.Page2.page2.Subform3.nama1muncul.presence="hidden"; end if

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar

Magus069

MVP

Total Posts

1.0K

Likes

132

Correct Answer

150

Avatar

Magus069

MVP

Total Posts

1.0K

Likes

132

Correct Answer

150
Magus069
MVP

11-05-2017

Hi there,

if you are using FormCalc language, ensure to not have a semi-colon before any code on the same line, the semi-colon in FormCalc is considered as a comment section.

If you are using JavaScript, you need the semi-colon at the end of each statements as you are doing with the code above, but instead of using "then" and "end if", you must use the brackets for JavaScript '{ }'

Here is a document with references about FormCalc you can use within LiveCycle Designer.

http://help.adobe.com/en_US/livecycle/es/FormCalc.pdf

You can search for LiveCycle JavaScript references on google for any help or any website like W3Schools is also good to learn about JavaScript. Here is a document for the basics of Javascript in LiveCycle.

http://help.adobe.com/en_US/livecycle/es/LiveCycle_Designer_Scripting_Basics.pdf

Hope this will help!