> For the complete documentation index, see [llms.txt](https://docs.ngsurvey.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ngsurvey.com/form-management/form-designer/preview-testing/pref-filled-answers.md).

# Pref-filled answers

## 👀 What are pre-filled answers ?

Pre-filled answers allows you to create a [deployment link URL](/form-management/publish-deploy.md) 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](/form-management/form-designer/preview-testing.md) 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](/form-management/form-designer/answers/answer-properties.md) 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](/form-management/form-designer/preview-testing.md). Once its enabled you will be able to see and copy the pre-filled link from the preview navigation toolbar.

![](/files/-MBs71aVWv0Jng3LCT9Q)

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](/form-management/publish-deploy/web.md) 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](/form-management/form-designer/answers/answer-properties.md)

![](/files/-MBs9JBd-WrFThF8boT2)

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

![](/files/-MBsALMUC3dI8aL4RU6d)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.ngsurvey.com/form-management/form-designer/preview-testing/pref-filled-answers.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
