如何找到或创建一个具有禁止相同答案功能的问卷?

I need help. We need to find a questionnaire in which the answer to the question (for example, telephone number) may not be the same for two users. For Example:

Enter a phone number:

First the user enters a phone number: 123456789 And completes the survey.

The second user starts to question and answers the same phone number 123456789. He receives an error message or a request to enter a different answer.

Or is there any easy implementation of this problem using php or javascript.

Maybe it is possible to implement with surveymonkey api.

I would be glad of any help or advice.

Google forms writes to a spreadsheet database, allows regular expression fields and attached scripts. Set the field to mach your required format, then validate the response with a script.

Your requirement is persistent storage. You will either require a database, such as MySQL, and use PHP to access it, or a third party application such as SurveyMonkey. However, I can't tell you the limitations of SurveyMonkey, you will have to check their documentation.

I realize that this late and this thread is limited but for others looking for same answer. Here is how I did exactly the same thing for one of my coworkers using Examinare Framework and Examinare Survey Tool.

  1. First, create a html form that sends the phone number to a form.

Inside that PHP file call Examinare PHP Wrapper and check if a recipient has this phone number on their recipient profile.

https://developer.examinare.com/apidocs/listrecipientsbygroup/

A tip: And loop through it the results.

  1. If the recipient not exist, create the recipient. Make sure you add a fake or real email to prevent getting an error.

https://developer.examinare.com/apidocs/addrecipient/

  1. Mark the recipient as a active in the survey. https://developer.examinare.com/apidocs/markrecipientstosurvey/

  2. Redirect to the survey. If you want the recipient to return to a certain path then add redirect_url variable to the url with a valid url.

Hope it helps you and future seakers.