Skip to main content
Participant
August 6, 2025
Answered

Dynamic template issue with hidden and visual fields

  • August 6, 2025
  • 2 replies
  • 209 views

I have created 2 Javascripts to visualize and hid specific fields. 

These fields have the properties "hidden" 

When activating the Java script these fileds become visible, exactly how it should. But when de-activing  a Java script the properties of these fields changes from "hidden" to "visible" 

 

Is this a known issue? Or is there somebody how knows how to deal with this

    Correct answer Bert Jan379687316sq0

    Sorry, could indeed be that I used the wrong platform.

    But in all cases it is fixed; 
    It could be fixed by changing the Java script:
    (this.getField("Box 1").value == "Yes") to show all fields 
    and
    (this.getField("Box 1").value == "No") to hide all fields 
    And if you use this, the stated properties of a field changes to "visible" .
    But if you change "No" by "Off"
    (this.getField("Change Type 1").value == "Off")

    then it works

    2 replies

    BKBK
    Community Expert
    Community Expert
    August 7, 2025

    It's much easier to discuss code if we can actually see it. So could you please share the code, pointing to where the problem is?

    Charlie Arehart
    Community Expert
    Community Expert
    August 6, 2025

    Bert, are you asking this with respect to ColdFusion? I'm asking for two reasons.

     

    First I just want to make sure your question is in the correct Adobe forum (people sometimes pick the wrong one), and your issue may relate to some specific aspect of another Adobe product. 

     

    Second, this doesn't sound like a cf-

    specific problem. Would you agree? In that case, if you don't get answer here (I think more detail is needed), you could ask it elsewhere (including asking an AI). 

     

    What could really help is if you took a few minutes to put together a few-line example that demonstrates your problem, in a way that anyone could run, and share that.

     

    Sometimes in doing that, you discover the problem. 🙂 If not, share that few-line demo so we can confirm seeing what you see and could recommend a tweak to get what you want. 

    /Charlie (troubleshooter, carehart. org)
    Bert Jan379687316sq0AuthorCorrect answer
    Participant
    August 8, 2025

    Sorry, could indeed be that I used the wrong platform.

    But in all cases it is fixed; 
    It could be fixed by changing the Java script:
    (this.getField("Box 1").value == "Yes") to show all fields 
    and
    (this.getField("Box 1").value == "No") to hide all fields 
    And if you use this, the stated properties of a field changes to "visible" .
    But if you change "No" by "Off"
    (this.getField("Change Type 1").value == "Off")

    then it works

    BKBK
    Community Expert
    Community Expert
    August 8, 2025

    Thanks, @Bert Jan379687316sq0 , for sharing the fix.