Skip to Content
author's profile photo Former Member
Former Member

Make visible/invisible an element of Interactive Form

Hello everyone,

Is it possible to dynamically choose, during runtime, if i want an element of an Adobe Interactive Form to be visible or not ? If so, can someone please show a piece of code (probably script...) ?

Thank you all,

Nuno Santos

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Nov 10, 2006 at 06:03 PM

    Hi,

    if the filed value in not available then that space to be hidden for that

    Goto the fields make it wrapin subform and make formlayout.

    If($.isNull) then

    $.presense=”hidden”

    else

    $.presense="visible"

    endif

    u can utilize like this.

    $.fieldname="hidden"

    other wise fild names also

    if ( Subform11.NumericField5.value == "-1" ) then

    Subform11.NumericField5.presence = "hidden"

    Subform11.presence = "hidden"

    else

    Subform11.NumericField5.presence = "visible"

    Subform11.presence = "visible"

    endif

    Intialization event should work.

    RawValue contains before formated value.

    Scenario 1 : Depending on a specific value a field has to be hidden.

    a) Select the field you want to hide depending on a condition. (On the layout designer)

    b) Choose ‘FormCalc’ as language and ‘Form:Ready’ as event. (On the script editor)

    c) Scripting:

    if ( $.rawValue == .presence = “hidden”

    endif

    u can do like this and please close the previos threads table and image

    Helpful answers please reward.

    Thanks ,

    Lohi.

    Message was edited by:

    Lohitha M

    Message was edited by:

    Lohitha M

    Add a comment
    10|10000 characters needed characters exceeded

    • @Lohitha

      I exactly need Scenario 1:

      Scenario 1 : Depending on a specific value a field has to be hidden.

      a) Select the field you want to hide depending on a condition. (On the layout designer)

      b) Choose ‘FormCalc’ as language and ‘Form:Ready’ as event. (On the script editor)

      c) Scripting:

      if ( $.rawValue == <value> ) then

      $.presence = “hidden”

      endif

      _________

      But I don't know where to choose "Form:Ready" as event. And even the language in my script editor within SFP transaction is JavaScript and cannot be changed.

      When I create a script object, I get two new lines in my hirarchy. If I select the first line I see the field where I could choose the event but everything is gray and I cannot choose "Form:Ready".

      When I select the second line I get the window where I can enter the JavaScript coding. In this window there is already the following line filled:

      -


      data.#pageSet[0].Seite1.Info.#variables[0].#script[0] : : - JavaScript, client) -


      I tried to enter the following coding there but hiding does not work:

      if (KNTNR.value =="") {

      KNTNR.presence ="hidden";

      }

      I want to achieve that the textfield "KNTNR" is hidden if there is no value in it (if it is initial).

      Hope you can help me.

      Thanks

      Message was edited by:

      Taoufik Hartit

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.