customer_subscribe
Generates a form for subscribing an email or mobile phone.
Params
return_to{String}Redirect URL after form submit, defaults to the current page URL.
Inputs
| input | type | name | required | remarks |
|---|---|---|---|---|
| customer[email] | Required for subscribing an email | Choose one of email/phone | ||
| phone | phone | customer[phone] | Required for subscribing a phone | Cell phone number format: international closed phone number, e.g. China cell phone number: 15600000000 |
| area code | text | customer[code] | Required for subscribing a phone | Area code is the international telephone area code, for example, China cell phone area code: 86 |
Example
{{#form "customer_subscribe"}}
<div class="email">
<label for="customer[email]">email</label>
<input type="email" name="customer[email]" placeholder="please input an email" />
</div>
<div class="submit">
<input class="submit-button" type="submit" value="subscribe">
</div>
{{/form}}
Was this article helpful to you?