Script in Display Form

Discussions about Forms Designer for SharePoint 2010.
Post Reply
ChrisMBS
Posts: 4
Joined: Wed Jun 19, 2013

28 Apr 2013

Hi,

I have written code into the Display, New, and Edit Forms that show and hide fields based on inputs.

The New and Edit Forms work correctly.

However the Display Form shows every field regardless. It doesn't appear to be executing the javascript like the New and Edit Forms. The code is exactly the same for all three forms.

How do I get it to work the same?

Regards

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

29 Apr 2013

You can use JS-framework to change edit or new forms dynamically on the client side while user edits values in fields.

For the Display form I recommend you to use Rules: http://spform.com/documentation/groups.

ChrisMBS
Posts: 4
Joined: Wed Jun 19, 2013

29 Apr 2013

Thanks for the response.

Within the rules area, is it possible to show and hide fields based on selections? E.g. If checkbox A is selected then hide Textbox A.

Cheers

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

02 May 2013

Sure, you can build Rules based on field values and create different forms for them. Just create a new rule with formula: [Checkbox] = 'True' where 'Checkbox' is title or internal name of your checkbox field. Now you can create specific forms for this rule and hide textbox field in particular.

ds4be
Posts: 20
Joined: Fri Nov 07, 2014

20 Jan 2015

Hi

I have created a new group and placed conditions when the form is to be used, however how do I ensure that the Display form is used only as i do not want to use the edit and new forms?

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

20 Jan 2015

Hi,

If you don't want to override Edit and New forms for this new group, just do not touch them in Forms Designer and modify Display form only.

ebelford
Posts: 10
Joined: Mon Aug 15, 2016

12 Sep 2016

I was under the impression that the Groups and Rules functionality was not compatible with Forms Designer for Office 365. If this is true, how would I accomplish this in Sharepoint Online? My New and Edit Forms are working as expected... the problem only exists on my Display form.


Thanks

User avatar
Dmitry Kozlov
Site Admin
Posts: 1524
Joined: Thu Jun 07, 2012

13 Sep 2016

Hi,

Find a workaround for SharePoint Online:

http://spform.com/forms-designer- ... int-online

Post Reply
  • Information
  • Who is online

    Users browsing this forum: No registered users and 2 guests