I have been tasked with creating a form that individuals will fill out and then submit it. It will then go into a List that the HR department has access to. We dont want everyone to have access to the list, just the form. Is this possible? I have done forms with everyone having access but never one where its filled out and then the user can't see the other forms from other users? I have been googling forms to list but thought I would ask here so I could further explain what I need done.
Though I am not sure if Farm solutions can be used so I can provide you with a workaround with the help of workflows.
Break permission of the list and give users Add permission. HR group can have any permission you like.
On item creation on the list start a workflow which gives HR users the desired permission and remove everybody else permission. This way you can manipulate the permission at item level and one user will never be able to see another user item.
Technically no. There is no way to save an item without having permission on the list. Not to worry, there are workarounds.
- Assign HR department to have contribute access while disabling access to all other users.
- You may enclose your code with SPSecurity.RunWithElevatedPrivileges method to open a new SPWeb context that will personify as your app pool / system account.
- You may choose to overwrite the default form but you would need to create your custom save button. Alternatively, you can create your form in the webpart. Both techniques will require the RunWithElevatedPrivileges.
- Do take note that the CreatedBy and ModifiedBy must be assigned/updated if you want to retain the info of the actual user who created the item.