Javascript running in Display forms


Posted by marcwenger - Dec 19 ’13 at 01:10

In my new and edit forms, I have javascript to show/hide certain fields depending on another field's value.  This appears not to work in the Display view, either because the script runs before the page is loaded, or the field is un-readable in the Display view.  How do I get fields read in the Display form?

I put an alert(varname) in the script and when running in the display view it comes back as undefined.  The same javascript works in New and Edit forms.




  • Dmitry Kozlov
    Dmitry Kozlov
    Member for: 5 years 8 months 29 days
    #1 by Dmitry Kozlov Dec 22 ’13 at 10:26

    Thank you for your question. You can get text representation of fields in Display form by using the following script:


    But If you want to make Display form dynamic based on field values, I recommend you to use Rules:

Displaying 1 to 1 of 1 messages