cancel
Showing results for 
Search instead for 
Did you mean: 

Hide/Display based on value in a field

narendar_naidu
Active Participant
0 Kudos

hi all,

i am new to Adobe forms, and before posting ive searched ...but cudn't find any solution.

i have to display family details in four fields , if there are only 2 family details , i want to hide the rest 2 fields.

dynamically.   i have created a text box and in that i have created four text fields. i have binded the data using my interface variables to these text fields.

this is an Auto fill form (based on emp id i have to populate these values in the fields automatically --No user entry).

i have tried using actions on text fields...( if text object 1  is empty...hide rest fields) it did not work....then i searched and tried using form calc...but did not work.

any help wud be gratefull...do i need to add logic on the variable i have binded ? please guide.

regards,

Accepted Solutions (0)

Answers (3)

Answers (3)

narendar_naidu
Active Participant
0 Kudos

thank you all for your replies. issue resolved using table and calling on to the form.

Former Member
0 Kudos

Hi Naren,

If you want to hide fields please use javascipt in Adobe Form.

For example I have 3 Fields binding with Interface data:

---> A field

---> B field

---> C field

Please do by step below:

--- Select A field ->Palettes-> ScriptEditor(Ctr+Shift+F5)

     --->Show: initialize

     --->Language : Javascript

     --->Run At : client

Please see screenshot ()

( When you click Script Editor this code will show automatic

----- data.#subform[0].TextField1::initialize: - (JavaScript, client) ------------------------------

Please inter code below :

if(this.rawValue == null)

{

          this.presence ="hidden"

}

------------------------------------------------------------

--- Select B field ->Palettes-> ScriptEditor(Ctr+Shift+F5)

     --->Show: initialize

     --->Language : Javascript

     --->Run At : client

( When you click Script Editor this code will show automatic

----- data.#subform[0].TextField2::initialize: - (JavaScript, client) ------------------------------

Please inter code below :

if(this.rawValue == null)

{

  this.presence ="hidden"

}

.........

I hope it helpful code.

Kind regards,

Keu.

navip
Active Participant
0 Kudos

Hi Naren,

Create a Table and wrap the table in a Subform, then place the variable(Emp_ID) on top of subform.

On each column of the table, write FormCalc as:

if ($.parent.Emp_id ==  "xxxx" ) then

$.presence = "hidden"

---

Naveen