Script in Display Form

rss

Posted by ChrisMBS - Apr 28 ’13 at 10:40

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

  • Dmitry
    Dmitry
    Admin
    Member for: 7 years 6 months 2 days
    #1 by Dmitry Apr 29 ’13 at 12:31

    The message was removed by a forum moderator.

  • Dmitry
    Dmitry
    Admin
    Member for: 7 years 6 months 2 days
    #2 by Dmitry Apr 29 ’13 at 12:32

    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
    Member
    Member for: 6 years 7 months 21 days
    #3 by ChrisMBS Apr 29 ’13 at 06:29

    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

  • Dmitry
    Dmitry
    Admin
    Member for: 7 years 6 months 2 days
    #4 by Dmitry May 2 ’13 at 02:07

    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
    Member
    Member for: 5 years 1 month 2 days
    #5 by ds4be Jan 20 ’15 at 09:05

    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?

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 22 days
    #6 by Dmitry Kozlov Jan 20 ’15 at 09:13

    [#5]: 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
    Member
    Member for: 3 years 4 months 10 days
    #7 by ebelford Sep 12 ’16 at 09:38

    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

  • Dmitry Kozlov
    Dmitry Kozlov
    Admin
    Member for: 6 years 2 months 22 days
    #8 by Dmitry Kozlov Sep 13 ’16 at 01:17
Displaying 1 to 8 of 8 messages