What this product is
Sample Form is a no-code form designer for SharePoint Subscription Edition (on-premises). A farm administrator deploys one solution package. Site owners then add the Sample Form web part to a page, design the form, and save submissions to a SharePoint list.
| Item | Value |
|---|---|
| Solution package | SampleForm.wsp |
| Deploy script | Deploy-SampleForm.ps1 |
| Feature | Feature1, site-collection scope |
| Feature ID | B7C8D9E0-F1A2-4B3C-8D9E-0F1A2B3C4D5E |
| Web part file | SampleForm_Procform.webpart |
| Gallery | Group: Microsoft Forms · Title: Sample Form |
1Before you start
Ensure you have the following before proceeding.
- 1SharePoint Subscription Edition farm (on-premises).
- 2An account in the Farm Administrators group, run on a server that has the SharePoint binaries.
- 3SharePoint Management Shell (the Subscription Edition shell). Run it as Administrator.
- 4The web application URL and the site collection URL where the form will be used.
- 5The files from this download: SampleForm.wsp and Deploy-SampleForm.ps1.
2Copy the files to the server
On a SharePoint server, create a folder and copy both files into it.
C:\Deploy\SampleForm\SampleForm.wsp
C:\Deploy\SampleForm\Deploy-SampleForm.ps13Deploy (recommended)
Open SharePoint Management Shell as Administrator and run the deploy script.
- 1Loads the SharePoint PowerShell snap-in.
- 2First install: Add-SPSolution, then Install-SPSolution to the web application (GAC).
- 3Later updates: Update-SPSolution (GAC) using the same WSP name, SampleForm.wsp.
- 4Waits until the timer job finishes. You should see LastResult=DeploymentSucceeded.
- 5Activates Feature1 on the site collection if it is not already active.
- 6Sets the web part gallery entry to title Sample Form and group Microsoft Forms.
cd C:\Deploy\SampleForm
.\Deploy-SampleForm.ps1 `
-WspPath "C:\Deploy\SampleForm\SampleForm.wsp" `
-WebAppUrl "https://sharepoint.contoso.com" `
-SiteUrl "https://sharepoint.contoso.com"4Deploy by hand (optional)
Use this only if you are not running Deploy-SampleForm.ps1. Run each block in SharePoint Management Shell as Administrator. Wait for each solution job to finish before the next command.
# First-time install
Add-PSSnapin Microsoft.SharePoint.PowerShell
Add-SPSolution -LiteralPath "C:\Deploy\SampleForm\SampleForm.wsp"
Install-SPSolution -Identity "SampleForm.wsp" `
-WebApplication "https://sharepoint.contoso.com" `
-GACDeployment -Force
# Update an existing solution
Update-SPSolution -Identity "SampleForm.wsp" `
-LiteralPath "C:\Deploy\SampleForm\SampleForm.wsp" `
-GACDeployment -Force
# Activate the feature on the site collection
Enable-SPFeature -Identity "B7C8D9E0-F1A2-4B3C-8D9E-0F1A2B3C4D5E" `
-Url "https://sharepoint.contoso.com"5Restart IIS
After DeploymentSucceeded, restart IIS so every server loads the updated assembly. On each server that serves the web application:
iisreset6Confirm the install
Verify the solution deployed successfully.
- 1Run the PowerShell command above and confirm Deployed : True.
- 2Open the site collection. Edit a page, choose Insert, then Web Part. Under Microsoft Forms, Sample Form should be listed.
- 3Add the web part. While the page is in edit mode, choose the list, fields, theme, and validation, then Save form configuration.
- 4Save and check in the page, then stop editing. Hard-refresh the browser (Ctrl+F5) and submit a test item. The item should appear in the list you selected.
Get-SPSolution SampleForm.wsp | Format-List Name, Deployed, LastOperationResult, LastOperationEndTime7Put the form on a page
Once the solution is deployed and the feature is active, add the web part to any page.
- 1Create or open a site page on the site collection where the feature is active.
- 2Edit the page → Insert → Web Part → Microsoft Forms → Sample Form.
- 3In the designer, set the title, theme, list, and fields. Select Save form configuration.
- 4Optional: choose Use this page as New item form so List → New opens this form. Restore default New form returns the list to the standard SharePoint form.
- 5Check in the page and stop editing.
8Update to a newer build
Copy the new SampleForm.wsp over the old file (or pass the new path). Run the same Deploy-SampleForm.ps1 command. The script detects the existing solution and runs Update-SPSolution. Then run iisreset and hard-refresh the browser.
9If something fails
Use this table to diagnose common issues.
| What you see | What to do |
|---|---|
Script says the WSP was not found | Pass -WspPath with the full path to SampleForm.wsp. Confirm the file is on the server where you run the shell. |
JobExists=True for a long time | Wait. Then open Central Administration → Monitoring → Check job status, and look for the solution deployment job. Do not start a second update until the first job finishes. |
Web part is missing from the picker | Confirm the feature is active on that site collection. Run the deploy script again so it refreshes the gallery entry. Use Ctrl+F5. |
The page still shows the old form | Confirm Get-SPSolution shows DeploymentSucceeded after the update. Run iisreset on the web servers, then Ctrl+F5. |
Save says no fields are selected | Choose the list, load fields, tick the columns to show, then save the form configuration again. |
Banner upload fails | Use JPG, PNG, or GIF under 5 MB. The account needs permission to add files to Site Assets. |
Access denied on Add-SPSolution or Install-SPSolution | Use a farm administrator, on a SharePoint server, in SharePoint Management Shell started as Administrator. |
10Uninstall
Remove the web part from pages first. Then run the following in SharePoint Management Shell.
Disable-SPFeature -Identity "B7C8D9E0-F1A2-4B3C-8D9E-0F1A2B3C4D5E" `
-Url "https://sharepoint.contoso.com" -Confirm:$false
Uninstall-SPSolution -Identity "SampleForm.wsp" `
-WebApplication "https://sharepoint.contoso.com" -Confirm:$false
# Wait for the job to finish, then:
Remove-SPSolution -Identity "SampleForm.wsp" -Confirm:$falseSample Form · SharePoint Subscription Edition · Deployment Manual. Keep this file with SampleForm.wsp and Deploy-SampleForm.ps1.