# Pref-filled answers

## 👀 What are pre-filled answers ?

Pre-filled answers allows you to create a [deployment link URL](https://docs.ngsurvey.com/form-management/publish-deploy) that will pre-fill your survey with specific values. Once you share this link with your respondents ngSurvey will pre-fill the survey with the values that have been set in this link to select questions or fill fields.&#x20;

You may  either create manually pre-filled links or you can use the [preview / testing](https://docs.ngsurvey.com/form-management/form-designer/preview-testing) center to generate the link dynamically while you fill out the test survey.

{% hint style="info" %}
You may also set the default text value on your [answer properties](https://docs.ngsurvey.com/form-management/form-designer/answers/answer-properties) to set a default text that will fill your fields on the first time your respondents take the surveys.
{% endhint %}

## 🔗 Dynamic generation

To generate dynamically the link while you select the answers make sure to enable the generate **pre-filled answers url** property of the [preview / test center](https://docs.ngsurvey.com/form-management/form-designer/preview-testing). Once its enabled you will be able to see and copy the pre-filled link from the preview navigation toolbar.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MBs5MOep7GVBOGzwEfg%2F-MBs71aVWv0Jng3LCT9Q%2Fimage.png?alt=media\&token=7e9385aa-b730-4683-b318-5363845746b6)

ngSurvey will automatically build the link based on your actual test survey selections and entries.

## &#x20; ✍️ Manual generation

Advanced users may use the [web link](https://docs.ngsurvey.com/form-management/publish-deploy/web) and append manually the values that should be used to pre-fill the survey.&#x20;

Values should be added as a querystring name / value pair with following format&#x20;

a\_fieldansweridtofill=yourvalue\
q\_questiontoselect=answeridtoselectforthatquestion

In the sample below ngSurvey would &#x20;

1. &#x20;fill the survey answer field having an id of MBs6BnWERPH69EIEZiba with a value John.
2. select the question with id MBs63pNZnnxG7ctdYfIa with the answer having an id of MBs63pNZnnxG7ctdYfJa&#x20;

```
https://www.ngsurvey.com/s/M6duyo80Qkfd1Eh7Vyna?a_MBs6BnWERPH69EIEZiba=John&q_MBs63pNZnnxG7ctdYfIa=MBs63pNZnnxG7ctdYfJa
```

&#x20;You may find the answer id in the browser URL when you edit the [answer properties](https://docs.ngsurvey.com/form-management/form-designer/answers/answer-properties)

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MBs97aoImQPeLfCGTQ_%2F-MBs9JBd-WrFThF8boT2%2Fimage.png?alt=media\&token=43b9b89c-d2a9-4f82-aee0-2e90218ea256)

The question id can also be found in the browser url when you edit the [question properties](https://docs.ngsurvey.com/form-management/form-designer/questions/question-properties).

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MBsAFL3vAGkSqLufoFh%2F-MBsALMUC3dI8aL4RU6d%2Fimage.png?alt=media\&token=c52bfa2e-8fae-4665-8163-25dcb0c29cae)
