Embedding a Sign-Up Form in a Page
This guide will help you embed a sign-up form in a page.
Requirements
To follow the steps in this tutorial, you should be familiar with the required directory structure for your codebase, and understand the concept of pages. You'll use the sign-up forms created in a previous tutorial.
- Codebase
- Pages
- Creating a Sign Up Form (previous tutorial)
Steps
Embedding a sign up form is a two-step process:
Step 1: Create page
Create a new page in the app/views/pages/developer directory named sign-up.liquid, and another page in the views/pages/client directory named sign-up.liquid.
Step 2: Embed form
Add {% include_form 'developer_sign_up' %} to embed the previously created sign up forms into the sign up pages.
app/views/pages/developer/sign-up.liquid
---
slug: developer/sign-up
---
<h1>Create a Developer Account</h1>
{% include_form 'developer_sign_up' %}
This will display the form you created previously at https://[your-domain]/developer/sign-up.
app/views/pages/client/sign-up.liquid
---
slug: client/sign-up
---
<h1>Create a Client Account</h1>
{% include_form 'client_sign_up' %}
This will display the form you created previously at https://[your-domain]/client/sign-up.
Next steps
Congratulations! You know how to embed a sign-up form in a page. Now you can learn about signing in a user: