0

I published an infopath form to my list. I want to hide the edit ribbon as shown below.

infopath form

but unfortunately when I hide ribbon using Form Options in Infopath 2013, my Rich Text Field named as Body has been damaged. Please refer to image below.

infopath form2

Please help.

1

Try this way around, using javascript you can show and hide ribbon on particular page.

  1. Open your SharePoint master page
  2. Locate this line: <div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle">
  3. Change it to: <div id="s4-ribbonrow" class="s4-pr s4-ribbonrowhidetitle" style="display:none">
  4. Now find the end of the “s4-ribbonrow” tag and add following block right after it:

    <Sharepoint:SPSecurityTrimmedControl ID="SPSecurityTrimmedControl2" runat="server" PermissionsString="AddAndCustomizePages"> <script type="text/javascript"> document.getElementById("s4-ribbonrow").style.display = "block"; </script> </Sharepoint:SPSecurityTrimmedControl>

  5. Save the new master page and publish it.

  • 2
    What is the need for the SecurityTrimmedControl here? – Robert Lindgren Nov 20 '13 at 9:03
  • If you want to show it to current user having permissions defined in the PermissionString, then we can add SecurityTrimmedControl else want to hide for all in that case no need. – Anuja Nov 20 '13 at 9:10
  • Thabks @Anuja.. Ill try this and Ill get back to you. :)) – Ching29 Nov 20 '13 at 9:19
  • 1
    This is a bit of a hack... but who cares, it's SharePoint right? :P – David Nov 20 '13 at 9:28
  • Is this applicable to sharepoint Online? :) – Ching29 Nov 20 '13 at 9:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.