gpt4 book ai didi

wordpress - Contact Form 7 下拉菜单 需要力量吗?

转载 作者:行者123 更新时间:2023-12-02 20:07:30 25 4
gpt4 key购买 nike

我正在使用 Contact Form 7 为客户制作表格。我已将所有字段设为必填,包括选择(下拉)字段。但是,当未选择下拉字段时,表单仍在发送。

有什么方法可以“强制”要求填写一个字段吗?有没有人遇到过这个?你知道如何提供帮助吗?

这是我的代码:

 <label> Name: (Required)
[text* your-name] </label>

<label> Surname: (Required)
[text* your-name] </label>

<label> Contact Number: (Required)
[text* your-number] </label>

<label> Email Address: (Required)
[email* your-email] </label>

<label> Choose Branch: (Required)[select* recipient "Choose Branch:"
"Johannesburg|christie@oonie.co.za"
"Pretoria|christie@oonie.co.za"
"Cape Town|christie@oonie.co.za"
"Durban|christie@oonie.co.za"
"Garden Route|christie@oonie.co.za"
"Port Elizabeth|christie@oonie.co.za"
"East London|christie@oonie.co.za"
"Nelspruit|mchristie@oonie.co.za"
"Vaal Triange|christie@oonie.co.za"]</label>

<label> Product: (Required)[select* product "Please select product:"
"Product"
"Product"
"Product"
"Product"
"Product"
"Product"
"Product"
"Product"]</label>

<label> Physical Address: (Required)
[text* your-area] </label>

<label> Size in Meters: (Required)
[text* your-area] </label>

<label> Enquiry
[textarea your-message class:bigger-textrea] </label>

[submit "Send"]

提前致谢!

最佳答案

看起来表单正在发送,因为选择字段确实总是被填写。您忘记了“include_blank”属性:

[select* menu-834 include_blank "product 1" "product 2" "product 3"]

它在下拉菜单的选项顶部插入一个空白项,评估为未填写。

请参阅下拉菜单中 include_blank 选项的文档:
https://contactform7.com/checkboxes-radio-buttons-and-menus/#select

关于wordpress - Contact Form 7 下拉菜单 需要力量吗?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54328872/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com