customer_unsubscribe
生成 取消邮箱/手机订阅 表单。
参数
return_to{String}表单提交后的跳转地址,默认为当前页面地址。
表单输入
| 输入项 | 输入类型 | 字段名 | 是否必填 | 备注 |
|---|---|---|---|---|
| 取消订阅类型 | 'email'/'phone' | customer[unsubscribe_type] | 是 | |
| 取消订阅原因 | enum | customer[unsubscribe_reason] | 否 | |
| 其他原因 | string | customer[other_reason] | 否 | 用户自定义取消订阅原因 |
取消订阅原因枚举
| 枚举值 | 含义 |
|---|---|
| 1 | 我不想接收此类邮件 |
| 2 | 我收到的邮件数量过多 |
| 3 | 我未订阅过此类邮件 |
| 4 | 邮件内容与我无关 |
| 5 | 邮件内容过长 |
| 6 | 其他 |
例子
{{#form "customer_unsubscribe"}}
<input type="hidden" name="customer[unsubscribe_type]" value="email" />
{{#each form.unsubscribe_reasons}}
<div class="unsubscribe-reason">
<input type="radio" name="customer[unsubscribe_reason]" value="{{value}}" />
<span>{{t text}}</span>
</div>
{{/each}}
<input type="text" maxlength="300" name="customer[other_reason]" value="" />
<div class="submit">
<input class="submit-button" type="submit" value="取消订阅">
</div>
{{/form}}
这篇文章对你有帮助吗?
SHOPLINE