dtwy2858 2018-04-27 12:05
浏览 32
已采纳

如何在发送Wordpress - CF7之前更改文本

I have contact form on my website and want to change one thing. My contact form have checkboxes and I want to send different text than is in checkbox. For example: I have checkbox with text "Test" and I want to send in mail "11:30 Tested". I try to do that in so many ways, but it's not working and I don't know where is problem. I check "hidden fields", but when I don't check my checkbox, in mail I have this hidden text.

Next to I try this:

solution from this forum

But I can't change my text, when checkbox is checked. When it is empty, this field send me "nej", but I want nothing :)

I saw this topic:

cf7 before send

If I have empty checkbox, cf7 send me text, like in hidden fields. Maybe this code can help me?

I have twenty checkboxes and I want to send different text from them, when they are checked. If not - I want to send nothing :)

Someone help me with this? Thanks so much! Rafael

PS I use Contact Form 7 in Wordpress to do that.

  • 写回答

1条回答 默认 最新

  • duanben1324 2018-04-27 12:14
    关注

    Contact Form 7 supports pipes ("|") as a separator of what users see and what is the actual value of the input. You can use it like that.

    [checkbox* test_checkbox use_label_element “Test|11:30 Test” “Test 2|12:30 Test”]
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛
  • ¥15 请问Lammps做复合材料拉伸模拟,应力应变曲线问题
  • ¥30 python代码,帮调试
  • ¥15 #MATLAB仿真#车辆换道路径规划
  • ¥15 java 操作 elasticsearch 8.1 实现 索引的重建
  • ¥15 数据可视化Python
  • ¥15 要给毕业设计添加扫码登录的功能!!有偿
  • ¥15 kafka 分区副本增加会导致消息丢失或者不可用吗?
  • ¥15 微信公众号自制会员卡没有收款渠道啊
  • ¥100 Jenkins自动化部署—悬赏100元