联系表格7-需要帮助的简码和价值

时间:2019-09-11 13:34:47

标签: html wordpress shortcode contact-form-7 wordpress-shortcode

我正在使用联系表单7插件创建表单,要求用户通过单击复选框选择颜色。 我更改了复选框的样式。用户提交表单时,我需要接收用户选择的颜色。

使用标准复选框时,我会通过电子邮件完美地接收颜色。

复选框样式更改后,我没有收到颜色。

我应该在HTML的哪里插入联系表格7所提供的简码,以接收通过电子邮件选择的颜色?

HTML代码如下

enum MyValue: Codable, RawRepresentable {


var rawValue: String {
    switch self {
    case .string(let stringVal):
        return stringVal
    case .innerItem(let myVal):
        return String(describing: myVal)
    }
}

typealias RawValue = String

init?(rawValue: String) {
    return nil
}



case string(String)
case innerItem(InnerItem)

}

let myVal = MyValue.string("testString")
var strVal: String = myVal.rawValue // testString

我要插入的简码是

<label class="container" for="red">
    <input class="single-check" type="checkbox" id="red">
    <span class="checkmark red"></span>
</label>

1 个答案:

答案 0 :(得分:1)

使用html标记时没有看到期望的值的原因是,它不属于“联系表单”字段。

您可以尝试以下操作:

<label class="container" for="checkbox-red">
    [checkbox checkbox-red id:red class:single-check value "Red,"]
    <span class="checkmark red"></span>
</label>

您还可以在Contact Form 7 Documentation

中找到更多信息。
相关问题