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

4
  • Are you OK with PowerSehll code? Feb 9, 2015 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, 2015 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? Feb 12, 2015 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, 2015 at 14:53

1 Answer 1

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.

0

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.