cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe Forms: Syntax for IF statement in Javascript

Former Member
0 Kudos

Hi Experts,

I have just stated working in Adobe Forms and i got stuck at one place.

In one of my forms i created one subform and put 2 standard texts with some variables in that. I have enabled all the attributes like auto fit for that subform and it is working too.

I used this syntax: Subform2.SUPPLYADDRESS.presence= "hidden" in initilize event.

I want one if condition before this statement where i can check whether SUPPLYADDRESS has value or not.

If it has value then display SUPPLYADDRESS and if doesn't have value then do not display SUPPLYADDRESS.

I am using JAVASCRIPT. I am not able to find the correct syntax for IF statement.

Can anyone solve my problem please.

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

ChrisSolomon
Active Contributor


if ((Subform2.SUPPLYADDRESS.rawValue != null) && (Subform2.SUPPLYADDRESS.rawValue != "")) {
  Subform2.SUPPLYADDRESS.presence= "visible";
} else {
  Subform2.SUPPLYADDRESS.presence= "hidden";
}

and word to the wise...Google is your friend if you need Javascript help.

Former Member
0 Kudos

Hey man thanks a lot, my problem is solved . i'll be firing so many questions to u in future. we have so many forms to dev.

Thanks onces again.

Former Member
0 Kudos

Can you please tell me how to attach custom Style to adobe form.

I have created 2 styles. One in se72 and second one in smatstyles.

But when i use 1st one in standard text, i can't see this style in adobe form to attach.

And 2nd one i can see it in adobe form but i can't see in standard text.

I want only 1 style to be used in both places.

Please help.

Thanks in advance.

sachin_dusane4
Discoverer
0 Kudos

Hi Experts

I had developed offline adobe form  and three button add delete and clear , i had written code of ADD and DELETE but i don't have any idea to write CLEAR button logic ,

And also check i had written for ADD and DELETE is it right or do some modification.

Code written -: For ADD. ( IT_ACT_CON is my table name)

var nTableLength = IT_ACT_CON.nodes.length;

var nRowNum = 0;

for ( var nCount = 0;nCount < nTableLength; nCount ++)

{

if((IT_ACT_CON.nodes.item(nCount).classname == "ITEM_SUBFORM")&

          (It_ACT_CON.nodes.item(nCount).name !== "HeaderRow")

{nNumRow = nNumRow + 1;

}

}

Give some suggestion.

sachin_dusane4
Discoverer
0 Kudos

Hi Experts

I had developed offline adobe form  and three button add delete and clear , i had written code of ADD and DELETE but i don't have any idea to write CLEAR button logic ,

And also check i had written for ADD and DELETE is it right or do some modification.

Code written -: For ADD. ( IT_ACT_CON is my table name)

var nTableLength = IT_ACT_CON.nodes.length;

var nRowNum = 0;

for ( var nCount = 0;nCount < nTableLength; nCount ++)

{

if((IT_ACT_CON.nodes.item(nCount).classname == "ITEM_SUBFORM")&

          (It_ACT_CON.nodes.item(nCount).name !== "HeaderRow")

{nNumRow = nNumRow + 1;

}

}

Give some suggestion.

Answers (0)