> For the complete documentation index, see [llms.txt](https://docs.valtt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.valtt.com/valtt.js-website-code/how-to-add-multiple-clickwraps-on-the-same-page.md).

# How to Add Multiple Clickwraps on the Same Page

To place multiple clickwraps on the same page copy the part of the code snippet **under** the "Required One Time" section.

Be sure to do the following:\
1\. Change "valtt1 = new valtt" to "valtt# = new valtt" - where # would be the number of the clickwrap on your page.\
2\. Update the valtt-clickwrap# div ID, the callback element #, and the clickwrap #.

```
<div id="valtt-clickwrap1"></div>
<script>
  valtt1 = new valtt(
    'Environment',
    'Organization-ID',
    'Agreement-ID',
    'AgreementName',
    'AgreementVersion',
    'AgreementStatement',
    'AgreementCompleteText',
    'valtt-clickwrap1',
    'Text-Class',
    'Button-Class',
    'Link-Class',
    'Callback-Element',
    'Clickwrap-Number',
    'n',
    '',
    '',
    '');
</script>
<div id="valtt-error-message-c1" class="small"></div>
<input type="hidden" id="Callback-Element" value="n" class="Callback-Element">
```

Here is an example of what a second clickwrap on a page might look like.

```
<div id="valtt-clickwrap2"></div>
<script>
  valtt2 = new valtt(
    'live',
    'Organization-ID',
    'Agreement-ID',
    'Test Agreement',
    'v1',
    'By clicking the button below, I agree to:',
    'Completed: Terms of Service. Thank you.',
    'valtt-clickwrap2',
    'Text-Class',
    'Button-Class',
    'Link-Class',
    'clickwrap-complete2',
    'c2',
    'n',
    '',
    '',
    '');
  valtt2.displayClickwrap();
</script>
<div id="valtt-error-message-c2" class="small"></div>
<input type="hidden" id="clickwrap-complete2" value="n" class="clickwrap-complete2">
```


---

# 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.valtt.com/valtt.js-website-code/how-to-add-multiple-clickwraps-on-the-same-page.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.
