cancel
Showing results for 
Search instead for 
Did you mean: 

Adobe form adding condition to subform

Former Member
0 Kudos

I have added an image to a subform and I would like to display that image if certain condition is true.

I added following code ing "readOnly" but its not working

if ($record.............................. <= "1000")

then

this.presence = "visible"

else

this.presence = "invisible"

endif

what should be the correct code?

Accepted Solutions (0)

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

Does your image static or do you use an attribute in Context for giving the image ?

If you use context, you can set condition on the attribute directly and that should work better.

regards

Former Member
0 Kudos

Hi,

Method1:

Select the Subform,then Goto Object Palette,select presence as Hidden and exclude from Layout.

Then select the event "FormReady" if your Subform is in BodyPage or Select event "LayoutReady" if you Subform is in Master Page and place your code either in FomCalc or in Java Script.

Method2: Create an Alternative in the Context and specify the Condition on Alternative.

Then goto Layout and drag the Alternative on to the respective Page (Body Page or MasterPage) and Place your Subform under TRUE.

Thanks.

UmaS.

OttoGold
Active Contributor
0 Kudos

Hello,

first: I am not very familiar with FormCalc so I can recommend you to use JS. If using JS, you can easily put a line of code like app. ale rt (" testing") which will popup a window with this message if the line of code is reached. This way I debug my code for syntax errors and also the runtime values. Your problem is you don´t know if your code is wrong or the value is not present as you expect etc.

I added following code ing "read Only" but its not working -> what does that mean?

next: youre using this and dollar-mark, this looks like a language mismatch, this is JS and dollar-mark is FC.

Have a nice day, Otto

Former Member
0 Kudos

Hi Otto,

what is the syntax code so we can debug our java script in the adobe form? thanks