> For the complete documentation index, see [llms.txt](https://www.locksmith.guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://www.locksmith.guide/tutorials/more/showing-multiple-prompts-on-the-same-page.md).

# Showing multiple prompts on the same page

How to set up Locksmith to show more than one input form when using more than one condition type on the same page

Many of Locksmith's access conditions require input from your customers, whether that be a login, or just a code entry or a confirm button press. Sometimes you might wish to give your customers flexibility by providing multiple different ways for a customer to gain access. For example, perhaps they can enter a passcode OR subscribe to your mailing list. Setting that up would look something like this:

<figure><img src="https://277214568-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUeGWHuijBPr8Og1Gta%2Fuploads%2FUmUpb8jmElECsTyjQli1%2FScreenshot%202024-08-08%20at%2012.58.38.png?alt=media&amp;token=f7f9f8c6-1ea4-41cd-807b-2350bdefa89d" alt=""><figcaption></figcaption></figure>

By default, **Locksmith only shows one entry method at a time to customers**. In the above example, you'd see something like this:

<figure><img src="https://277214568-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUeGWHuijBPr8Og1Gta%2Fuploads%2Fb6QE6Gn8KpWhXjwY5wnj%2FScreenshot%202024-08-08%20at%2014.14.40.png?alt=media&amp;token=b93fa6af-44c2-47ce-b4c5-fa5e442b507d" alt=""><figcaption><p>Newsletter prompts are prioritized over passcode prompts according to Locksmith's internal rules</p></figcaption></figure>

## Editing messages to show both forms

To include a specific form for a key condition that you're using, you can mix and match the following liquid variable outputs in your Locksmith messages:

<table><thead><tr><th width="267">Form/condition type</th><th>Liquid code used to include the form</th></tr></thead><tbody><tr><td>passcode</td><td><code>{{ locksmith_passcode_form }}</code></td></tr><tr><td>mailing list signup (i.e. Klaviyo or Mailchimp)</td><td><code>{{ locksmith_email_form }}</code></td></tr><tr><td>confirmation</td><td><code>{{ locksmith_confirmation_form }}</code></td></tr><tr><td>login - for store accounts. If you are not using legacy customer accounts, this is just a button pointing to the sign in page</td><td><code>{{ locksmith_customer_login_form }}</code></td></tr><tr><td>registration - for store accounts. only applicable if you are using the legacy customer account system</td><td><code>{{ locksmith_customer_registration_form }}</code></td></tr></tbody></table>

## Example

Continuing the passcode/klaviyo example from above, add this:

```
Subscribe to our mailing list to continue!

{{ locksmith_email_form }}

Or, enter the passcode:

{{ locksmith_passcode_form }}
```

Which results in this:

<figure><img src="https://277214568-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUeGWHuijBPr8Og1Gta%2Fuploads%2FOhpxFppBYJU3uXxNVARx%2FScreenshot%202024-08-08%20at%2014.31.04.png?alt=media&amp;token=9e5b444f-887d-4aee-b116-8fab3aca97ea" alt=""><figcaption></figcaption></figure>

## Which message should you edit?

The easiest way to make sure your locked pages display correctly when using multiple prompts is to simply **copy/paste the same exact message to each of your messages**. Technically only one of them will be used - which is based on Locksmith's internal sorting rules. But, for simplicity, use consistent messages:

<figure><img src="https://277214568-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MUeGWHuijBPr8Og1Gta%2Fuploads%2F5r54p53cKwDifMVXZrgK%2FScreenshot%202024-08-08%20at%2014.26.43.png?alt=media&amp;token=505f5a92-35a7-4dd9-86c7-e07fafc32c7d" alt=""><figcaption></figcaption></figure>


---

# 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://www.locksmith.guide/tutorials/more/showing-multiple-prompts-on-the-same-page.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.
