cancel
Showing results for 
Search instead for 
Did you mean: 

Hiding a static image.

Former Member
0 Kudos

Hi,

Currently I am working in static adobe form.There is a text field and static image field in the adobe form.Could you please let me know how to hide the static image field based on the value in the input field.When I use static image field the script editor is disabled.If possible please provide me sample of code.Thanks.

Arun.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi Arun,

There are two form fields for images. An "image" and an "image field", the first one is static and cannot be changed (no scripting allowed). The second one can have scripts. For the second one you often need to set it to read only since it allows to interactively change the content. Setting it to read-only:

/people/juergen.hauser2/blog/2006/01/31/access-mode-and-presence-of-fields-on-adobe-interactive-forms

So the answer to your question is exchange the field and add the two scripts.

Regards,

Juergen

Answers (1)

Answers (1)

OttoGold
Active Contributor
0 Kudos

Hello,

your script editor is disabled because you need to select the object to place the script on (button, edit, drop-down), next you need to select the event tro trigger the script (change, exit, layout:ready) and then the language (formcalc or javascript).

Next you write a code to hide your object:

if ( $record.G_TCODE_VARIANT eq "FMBB" ) //if data passed from backend in this variable is FMBB, hide

then

$.presence = "visible"

else

$.presence = "hidden"

endif

Note: $ works as (this), the object which calls the script (button etc.).

I guess you may place your script on the text-field change event (if the form is interactive, if not, use the code above to test the context node value) which is triggered when the value in the field has changed.

Hope this solves it, Otto