Skip to content

[FEATURE][FormTribe 🔥][500 Points] PIN protected surveys #1089

@jobenjada

Description

@jobenjada

Welcome to the FormTribe

This issue will get you the points mentioned in issue title for the FormTribe Hackathon

Preparation:
If this is your first time contributing, please read:

Only when your PR follows all of the best practices it will get merged.

Want more points quick? Complete Side Quests 🏰


Is your feature request related to a problem? Please describe.

Some users want to protect their survey with a code

Describe the solution you'd like

Enable protected surveys:

image

Tasks

  1. Add a new setting to the Response Options card, which is only visible if surveyType = link:
image

Name: Protect survey with a PIN
Subheadline: Only users who have the PIN can access the survey

image
  1. Validate that only numbers are added and not more than 4. You can validate on blur and if it doesnt match, delete the input and display a Toast with the following error message "Please set four numbers as PIN"

  2. Create the needed UI and import it to the LinkSurvey.tsx. The mockup above is from our upcoming UI revamp and only meant as guidance. No need to build it 1:1

  3. Build the logic needed to load the survey only in case the PIN was correct. The PIN does not help a lot if the survey object is completely loaded in the client before the PIN was entered 😃

Technical Challenge

Consult with chatGPT on how to implement this best. You have to find a way to check the PIN without previously exposing it in the public survey object. If you have questions, please reach out in our Discord!

Thanks 🙏

Metadata

Metadata

Labels

enhancementNew feature or requesthacktoberfestcomplete these issues to gather points for Hacktoberfest

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions