> 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/walkthroughs/capture-value-from-querystring.md).

# Capture value from query string

In this walkthrough you will see how to capture a value from the browser's querystring and store it along the respondent answers in a hidden field.

## 🕵 Hidden answer

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MBcYF_UnosoKJ3aCTh_%2F-MBcd8NE6Ii64-9eqd0q%2Fcaptured123.png?alt=media\&token=abada837-f41d-49d5-89dc-dc8942b5f06b)

1. At the left menu of the **Form designer.**
2. Switch to the **Answers** tab at the top of designer menu.
3. Choose **Hidden** answer.

{% hint style="info" %}
Place the [**hidden field answer**](/form-management/form-designer/answers/answer-types/hidden-field.md) inside of any existing question. It will stay hidden and won't be seen by respondent.
{% endhint %}

## 👔 Capture value from query string

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MBd-d-__TqH_TDCSBnh%2F-MBd6IUwLTwxwGWzGPqG%2Fcaptured%20\(1\).gif?alt=media\&token=d7d4e702-ae10-4c3c-8e71-e5473bcd6bd7)

1. Choose **Properties** in the tool bar on the right of the [Hidden](/form-management/form-designer/answers/answer-types/hidden-field.md) answer line
2. Go to the **Pipe source** at the end of the **Default text value** line.
3. Insert **Variable name** at **Querystring variable value**
4. Press **Pipe** to set the settings.

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MBdCs9m2uY7BvJ6ml_T%2F-MBdDlP8BxmnCGNCcgiD%2Fcapture5n.png?alt=media\&token=4edcaa1e-8193-4f93-9841-09e9440613dc)

5\. Set the querystring name and value and append it to the [survey deployment link](/form-management/publish-deploy.md)

![](https://1025048312-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M8fLhS0bmfBRyq0HdUm%2F-MBdCs9m2uY7BvJ6ml_T%2F-MBdEEQZM7xSwBxX2bA5%2Fcaptured6n.png?alt=media\&token=75844113-14bd-499c-96db-c7ae8e84a666)

6\. Once the respondent has submitted his answer you can view the captured value from the [respondents ](/form-management/respondents-management.md)report grid.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.ngsurvey.com/walkthroughs/capture-value-from-querystring.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
