联系表7在选项
-
-
如果不存在本机解决方案,则可以使用jQuery`val()`,`show()`和`hide()`来解决.If no native solution exists, you can solve this with jQuery `val()`, `show()` and `hide()`.
- 0
- 2012-06-21
- brasofilo
-
2 个回答
- 投票数
-
- 2012-10-30
Contact Form 7似乎本身支持此功能,但是如何实现它并不是很明显.
这是说明功能的文档页面: http://contactform7.com/selectable-recipient-with-pipes/
基本上,您要做的就是像这样放置值:
可见价值|实际形式价值
管道"|"之前的内容字符将显示在表格中,其后将是填写表格的实际值.
希望有帮助!
It looks like this is supported by Contact Form 7 natively, it's just not very obvious on how to make it happen.
Here's a documentation page explaining the functionality: http://contactform7.com/selectable-recipient-with-pipes/
Basically all you have to do is put the values like so:
Visible Value|actual-form-value
What comes before the pipe "|" character will be shown in the form, and what comes after will be the actual value filled in for the form.
Hope that helps!
-
这是行不通的.那里的文档不正确.This does not work. There documentation is incorrect.
- 4
- 2015-09-16
- Solomon Closson
-
@SolomonClosson实际上,这仍然有效;这很时髦.HTML格式不显示'raw'值,但是当链接末尾指出时,您可以使用前缀'_raw_'访问它们,例如_raw_YOURFIELD而不是YOURFIELD.@SolomonClosson Actually this still works; it's just funky. The form HTML doesn't show the 'raw' value, but as the link states at the end you can access them with the prefix `_raw_`, e.g. `_raw_YOURFIELD` rather than `YOURFIELD`.
- 3
- 2015-12-04
- drzaus
-
这仅适用于服务器端.根据文档,这是为了防止将值发送到浏览器客户端,因此,如果要使用javascript(jQuery的val())而不是选项文本(jQuery的text())访问选项值,请使用Demilio的解.This will work server side only. According to the documentation this is to prevent values to be sent to the browser client, so if you want to access the option value with javascript (jQuery's val()) instead of the option text (jQuery's text()), then go with Demilio's solution.
- 0
- 2017-12-23
- Herbert Van-Vliet
-
如果即时通讯使用"数据"属性填充选择内容,该怎么办?how to do that if im using the "data" attribute to populate the select ?
- 0
- 2019-01-13
- Zorox
-
- 2012-06-21
我解决了这一问题,首先发布了标准的contct表单7表单,然后从联系表单7中复制了所有短代码创建的源代码.然后,我决定将短代码用作选择标签,而我使用了真正的select-在其中标记.这样,我可以使用Contact Form 7引擎,同时在选项标签中设置自己的值文本...
I solved this by publishing the standard contct form 7 form first, then I copied the source code created from all the short-codes from contact form 7. Then insteaed of using the shortcode as the select tag I used a real select-tag with in it. This way I could use the contact form 7 engine and at the same time set my own value-text in the option tags...
有人知道我如何在Contact Form 7插件的select-options中设置不同的评估吗?这是我正在尝试做的HTML示例