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”]
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?