Pipes for checkbox Contact Form 7

Asked

Viewed 431 times

1

I need to adapt a checkbox plugin Contact Form 7 wordpress with Pipes, what I’m doing:

Man shortcode on the form:

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

And I must 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 number on checkbox and one for the span, tried something like:

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

But the result hasn’t changed. I need it to stay that way:

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

Is there any way to do it?

1 answer

0


I solved the problem by defining inputs directly in the module configuration, I contacted the creator of the module who seemed to have neglected the question, including whether 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 just set the fields normally:

De: [t_name] <[mail]>

Telefone: [tel]

Cores: [cores]

Códigos: [checkbox-579]

Quantidade: [quantidade]

Corpo da mensagem:
[mensagem]

Browser other questions tagged

You are not signed in. Login or sign up in order to post.