Javascript running in Display forms
-
- Posts: 17
- Joined: Tue Dec 17, 2013
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.
thanks!
-m
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.
thanks!
-m
- Dmitry Kozlov
- Site Admin
- Posts: 1524
- Joined: Thu Jun 07, 2012
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:
http://spform.com/documentation/groups
Code: Select all
fd.field('InternalName').control()._el().text()
http://spform.com/documentation/groups
-
- Information
-
Who is online
Users browsing this forum: No registered users and 7 guests