Pipes for checkbox Contact Form 7

0

I need to adapt a checkbox of the wordpress Contact Form 7 plugin with pipes, which I'm doing:

My shortcode in the form:

[checkbox checkbox-579 "10 cm" "15 cm" "20 cm" "30 cm"]

And I have result:

...
<input type="checkbox" name="checkbox-579[]" value="10 cm">
<span class="wpcf7-list-item-label">10 cm</span>
...

I want you to have a value in the checkbox and one to span , I tried something like:

[checkbox checkbox-579 "10 cm|3000" "15 cm|3017" "20 cm|2362" "30 cm|2379"]

But the result has not changed. I need it to look like this:

...
<input type="checkbox" name="checkbox-579[]" value="3000">
<span class="wpcf7-list-item-label">10 cm</span>
...

Is there any way to do this?

    
asked by anonymous 27.11.2017 / 19:38

1 answer

0

I solved the problem by defining the inputs directly in the module configuration, I contacted the creator of the module that seemed to have disregarded the question, even if there are several questions about this problem in the plugin discussion forum.

Pipes only work with selects .

The solution:

<label> Nome (obrigatório)</label>
    [text* t_name] </label>

<label> E-mail (obrigatório)</label>
    [email* mail]

<label> Telefone</label>
    [text tel]

<label>Alturas Disponíveis</label>
<span class="wpcf7-form-control-wrap checkbox-579"><span class="wpcf7-form-control wpcf7-checkbox wpcf7-validates-as-required">
        <span class="wpcf7-list-item first">
            <input type="checkbox" name="checkbox-579[]" value="3000">
            <span class="wpcf7-list-item-label">10cm</span>
        </span>
        <span class="wpcf7-list-item">
            <input type="checkbox" name="checkbox-579[]" value="3017">
            <span class="wpcf7-list-item-label">15cm</span>
        </span>
        <span class="wpcf7-list-item">
            <input type="checkbox" name="checkbox-579[]" value="2362">
            <span class="wpcf7-list-item-label">20cm</span>
        </span>
        <span class="wpcf7-list-item last">
            <input type="checkbox" name="checkbox-579[]" value="2379">
            <span class="wpcf7-list-item-label">30cm</span>
        </span>
    </span>
</span>

<div class="colors clear">
                <strong>Selecione as Cores</strong>
                <ul class="colores">
                  <li class="select_cor Amarelo" title="Amarelo"></li>
                  <li class="select_cor Azul_Claro" title="Azul Claro"></li>
                  <li class="select_cor Azul_Escuro" title="Azul Escuro"></li>
                  <li class="select_cor Branco" title="Branco"></li>
                  <li class="select_cor Laranja" title="Laranja"></li>
                  <li class="select_cor Lilas" title="Lilas"></li>
                  <li class="select_cor Marfim" title="Marfim"></li>
                  <li class="select_cor Marrom" title="Marrom"></li>
                  <li class="select_cor Pink" title="Pink"></li>
                  <li class="select_cor Preto" title="Preto"></li>
                  <li class="select_cor Verde" title="Verde"></li>
                  <li class="select_cor Verde_Limao" title="Verde Limão"></li>
                  <li class="select_cor Vermelho" title="Vermelho"></li>
                  <li class="select_cor Rosa" title="Rosa"></li>
                </ul>
              </div>

[hidden cores class:hidden_cores]
<label> Quantidade</label>
    [text quantidade]
<label>Observações</label>
    [textarea mensagem] 

[submit "Enviar"]

And in the email simply set the fields normally:

De: [t_name] <[mail]>

Telefone: [tel]

Cores: [cores]

Códigos: [checkbox-579]

Quantidade: [quantidade]

Corpo da mensagem:
[mensagem]
    
01.12.2017 / 18:13