0

I can only open 'NewForm.aspx' in Advanced edit mode, not safe mode so struggling with finding the 'Fields' that I want to hide. Can anyone advise on how I can find these 'Fields' or perhaps a different way in which I can hide them? The form I have created is an InfoPath 2013 form, so if there is a way I can do this via InfoPath, that would be fantastic as well.

Thank you for your assistance -

Kind regards,

Janice

  • Are you OK with PowerSehll code? – Nadeem Yousuf Feb 9 '15 at 11:06
  • Hi Nadeem, I have PowerShell installed but have not used it as of yet - I am confident that I can pick it up fast, so if you have any steps and coding, I would be very grateful for your input on this. Thank you, Janice :) – Janice Feb 12 '15 at 9:53
  • This would be very easy if you create three different forms for the same list.. do you have multiple views for your Infopath form? – Christoffer Feb 12 '15 at 14:51
  • Hi user19952,I have now created multiple views for the InfoPath form, I will watch a youtube tutorial to assist me in making these views available in the SharePoint List – Janice Feb 19 '15 at 14:53
0

Here is the sample code:

$web = Get-SPWeb "http://yoursitename"
$list = $web.List["YourListName"]
$field1 = $list.Fields["YourFirstFieldInternalName"]
$field2 = $list.Fields["YourSecondFieldInternalName"]
$field1.ShowInNewForm = $false
$field1.Update()
$field2.ShowInNewForm = $false
$field2.Update()

Copy it and change the variables per your requirement. Then open SharePoint PowerShell (Run as Administrator) Paste the code and hit enter.

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.