sp-dev-fx-webparts/samples/react-poll
Hugo Bernier a184010e3c
Fixed json metadata
2024-03-24 17:37:51 -04:00
..
.devcontainer Fixed missing Poll sample 2024-03-24 13:35:08 -04:00
assets Fixed json metadata 2024-03-24 17:37:51 -04:00
config Create React Poll Webpart 2024-03-02 21:51:30 +05:30
fast-serve Create React Poll Webpart 2024-03-02 21:51:30 +05:30
sharepoint/assets Create React Poll Webpart 2024-03-02 21:51:30 +05:30
src Fixed typo for Loader file, Added step-by-step instructions how to set up poll, added image for webpart preview 2024-03-17 01:38:36 +05:30
teams Create React Poll Webpart 2024-03-02 21:51:30 +05:30
.eslintrc.js Create React Poll Webpart 2024-03-02 21:51:30 +05:30
.gitignore Create React Poll Webpart 2024-03-02 21:51:30 +05:30
.npmignore Create React Poll Webpart 2024-03-02 21:51:30 +05:30
.nvmrc Added Assets folder and .nvmrc file 2024-03-09 18:06:04 +05:30
.yo-rc.json Create React Poll Webpart 2024-03-02 21:51:30 +05:30
README.md Fixed missing Poll sample 2024-03-24 13:35:08 -04:00
gulpfile.js Create React Poll Webpart 2024-03-02 21:51:30 +05:30
package-lock.json Fixed typo for Loader file, Added step-by-step instructions how to set up poll, added image for webpart preview 2024-03-17 01:38:36 +05:30
package.json Fixed typo for Loader file, Added step-by-step instructions how to set up poll, added image for webpart preview 2024-03-17 01:38:36 +05:30
tsconfig.json Create React Poll Webpart 2024-03-02 21:51:30 +05:30

README.md

React Poll

Summary

This web part allow User to add New Poll Questions and their options. End users can submit his/her response to the poll. After Submission, user can see all responses count with Bar chart.

React-Poll

Webpart - 1

Webpart - 2

Following are some of the features of this component.

  • These 2 lists will be provisioned automatically with necessary columns.

  • Poll Questions : User can add New poll question and their options. Also, user can set to keep it active or not.

Poll Questions

  • Poll Answers: This list will hold all Answers give by End users with his/her email id.

Poll Answers

  • Poll response can be viewed via Bar chart.

  • Easy to configure.

Compatibility

| ⚠️ Important |

|:---------------------------|

| Every SPFx version is optimally compatible with specific versions of Node.js. In order to be able to build this sample, you need to ensure that the version of Node on your workstation matches one of the versions listed in this section. This sample will not work on a different version of Node.|

|Refer to https://aka.ms/spfx-matrix for more information on SPFx compatibility. |

This sample is optimally compatible with the following environment configuration:

SPFx 1.17.1

Node.js v16.13+

Compatible with SharePoint Online

Does not work with SharePoint 2019

Does not work with SharePoint 2016 (Feature Pack 2)

Local Workbench Unsupported

Hosted Workbench Compatible

Compatible with Remote Containers

Applies to

Get your own free development tenant by subscribing to Microsoft 365 developer program

Prerequisites

Contributors

Version history

| Version | Date | Comments |

| ------- | ---------------- | --------------- |

| 1.0 | March 16, 2024 | Initial release |

Minimal Path to Awesome

  • Clone this repository (or download this solution as a .ZIP file then unzip it)

  • From your command line, change your current directory to the directory containing this sample (react-poll, located under samples)* in the command line run:

  • npm install

  • gulp serve

This sample can also be opened with VS Code Remote Development. Visit https://aka.ms/spfx-devcontainer for further instructions.

How to Set up Poll

  • This solution will provision 2 lists "Poll Questions" and "Poll Answers"

  • To set up new Poll navigate to "Poll Questions" from "Site Contents"

  • Add new item with these metadata.

-- Question (Mandatory) - Question for the poll

-- Option 1 (Mandatory) - 1st Option for the poll

-- Option 2 (Mandatory) - 2nd Option for the poll

-- Option 3 (Non mandatory) - 3rd Option for the poll

-- Option 4 (Non mandatory) - 4th Option for the poll

-- Is Question Active (Mandatory) - Checkbox to Keep Poll active or not

-- Title (Mandatory) - Title of Poll

Set up Poll

  • P.S. : Only 1 poll with Active will be displayed.

Help

We do not support samples, but we this community is always willing to help, and we want to improve these samples. We use GitHub to track issues, which makes it easy for community members to volunteer their time and help resolve issues.

If you're having issues building the solution, please run spfx doctor from within the solution folder to diagnose incompatibility issues with your environment.

You can try looking at issues related to this sample to see if anybody else is having the same issues.

You can also try looking at discussions related to this sample and see what the community is saying.

If you encounter any issues while using this sample, create a new issue.

For questions regarding this sample, create a new question.

Finally, if you have an idea for improvement, make a suggestion.

Disclaimer

THIS CODE IS PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING ANY IMPLIED WARRANTIES OF FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR NON-INFRINGEMENT.