Answer the question
In order to leave comments, you need to log in
Contact form 7 checkbox handling before form submit?
There is an interesting problem.
Essence in the following: There is a form from 4 steps, is deduced in a modal window, steps are loaded on ajax. At the first three steps, the user answers questions with checkboxes (the first step is the question: What can you do? options: draw, code, write | other steps by analogy), at the fourth step, he needs to show the result based on the checkboxes he has set (for example: Artist: 4 out of 18, Blogger: 11 out of 18, Programmer: 0 out of 18), so that the user can determine what he is stronger in and place fields with a phone, soap, career guidance select, etc. below. and below the SUBMIT button.
Thus, as I understand it, I need to write a function in function.php that would process the checkboxes by clicking on the button when moving from step 3 to step 4?
Here's what it should look like:
[ШАГ1]
1. Что вы умеете?
[checkbox* checkbox-801 use_label_element "рисовать" "кодить" "писать истории"]
<button>Продолжить</button>
[ШАГ2]
2. Что еще умеете?
[checkbox* checkbox-802 use_label_element "еще рисовать" "еще кодить" " еще писать истории"]
<button>Назад</button> <button>Продолжить</button>
[ШАГ3]
3. Что еще?
[checkbox* checkbox-803 use_label_element "снова рисовать" "снова кодить" "снова писать истории"]
<button>Назад</button> <button>Продолжить c выполнением функции</button>
[ШАГ4]
Ваша профориентация:
[показать результаты подсчета чекбоксов]
Исходя из них вы можете зарегистрироваться
[select* menu-508 include_blank "Художник" "Кодер" "Блогер"]
[text your-name]
[email your-email]
<button>Назад</button> <button submit>ОТПРАВИТЬ</button>
<h1>Художник</h1>
<div style="width:100%; background: #000">
<div style="width: calc(<подставить переменную от художника>/18*100)%; background: #ff0000">
</div>
</div>
<h1>Кодер</h1>
<div style="width:100%; background: #000">
<div style="width: calc(<подставить переменную от кодера>/18*100)%; background: #ff0000">
</div>
</div>
<h1>Блогер</h1>
<div style="width:100%; background: #000">
<div style="width: calc(<подставить переменную от блогера>/18*100)%; background: #ff0000">
</div>
</div>
Answer the question
In order to leave comments, you need to log in
Isn't it easier to handle checkboxes on the front? and send them to an arbitrary script with Ajax?
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question