AnsweredAssumed Answered

Custome Javascript to update a text box not working on Display form

Question asked by nigade.shashank@gmail.com on Oct 29, 2017
Latest reply on Apr 25, 2018 by premsai908

Hi All,

 

I am having a form with multiple sections. This sections have a show/hide logic rule based on a text field. So e.g. if text field has value A then section A would be shown and so on.

Button click has a custom javascript to set this textbox with proper value. I have stored client ID of textbox in a variable and using NWF$ to set the value.

 

All works as expected in new and edit form but I have an issue in display form. As its a textbox it is disabled in display so javascript is not able to set value. I tried below approaches to overcome this issue

1. Using javascript variable which holds client ID of text box, show and enable text box.

2. Give class to textbox and use JQuery to find element so it can be shown and enabled.

 

But both fails it seems element cannot be found in display form with above two approaches. Can someone help me please.

Outcomes