-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-all-forms.html
More file actions
270 lines (250 loc) · 14.9 KB
/
test-all-forms.html
File metadata and controls
270 lines (250 loc) · 14.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Тест всех 7 форм - Cordoba Legal</title>
<script src="https://cdn.tailwindcss.com"></script>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.4.0/css/all.min.css">
</head>
<body class="bg-gray-100 p-8">
<div class="max-w-6xl mx-auto">
<div class="bg-white rounded-lg shadow-lg p-8 mb-6">
<h1 class="text-3xl font-bold mb-4">
<i class="fas fa-check-double text-green-600 mr-2"></i>
Тестирование всех 7 форм
</h1>
<p class="text-gray-600 mb-4">
Эта страница позволяет быстро проверить работу всех форм на лендинге
</p>
<div class="bg-blue-50 border-l-4 border-blue-600 p-4 rounded-r-lg">
<h3 class="font-bold text-blue-900 mb-2">Инструкция:</h3>
<ol class="list-decimal list-inside space-y-1 text-blue-800 text-sm">
<li>Откройте каждую форму на главной странице (index.html)</li>
<li>Заполните тестовыми данными</li>
<li>Отправьте форму</li>
<li>Проверьте редирект на success.php</li>
<li>Проверьте что лид попал в CRM (даже в HOLD это успех)</li>
</ol>
</div>
</div>
<!-- Forms Checklist -->
<div class="grid md:grid-cols-2 gap-6">
<!-- Form 1 -->
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-xl font-bold flex items-center">
<span class="bg-blue-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">1</span>
Cold (Hero)
</h3>
<input type="checkbox" class="w-6 h-6">
</div>
<div class="space-y-2 text-sm text-gray-600">
<p><strong>ID:</strong> <code class="bg-gray-100 px-2 py-1 rounded">form-cold</code></p>
<p><strong>Тип:</strong> cold</p>
<p><strong>Где:</strong> Hero секция (самый верх)</p>
<p><strong>Поля:</strong> name, phone, email</p>
<p><strong>Обработчик:</strong> handleFormSubmit()</p>
</div>
<a href="index.html#hero" class="mt-4 inline-block text-blue-600 hover:text-blue-700">
<i class="fas fa-external-link-alt mr-1"></i> Открыть форму
</a>
</div>
<!-- Form 2 -->
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-xl font-bold flex items-center">
<span class="bg-green-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">2</span>
Hot (Popup)
</h3>
<input type="checkbox" class="w-6 h-6">
</div>
<div class="space-y-2 text-sm text-gray-600">
<p><strong>ID:</strong> <code class="bg-gray-100 px-2 py-1 rounded">form-hot</code></p>
<p><strong>Тип:</strong> hot</p>
<p><strong>Где:</strong> Модальное окно (клик на кнопки CTA)</p>
<p><strong>Поля:</strong> name, phone, email, broker, amount</p>
<p><strong>Обработчик:</strong> handleFormSubmit()</p>
</div>
<p class="mt-4 text-sm text-gray-500">
<i class="fas fa-info-circle mr-1"></i> Нажмите кнопку "Начать возврат" для открытия
</p>
</div>
<!-- Form 3 -->
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-xl font-bold flex items-center">
<span class="bg-purple-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">3</span>
Calculator
</h3>
<input type="checkbox" class="w-6 h-6">
</div>
<div class="space-y-2 text-sm text-gray-600">
<p><strong>ID:</strong> <code class="bg-gray-100 px-2 py-1 rounded">form-calculator</code></p>
<p><strong>Тип:</strong> calculator</p>
<p><strong>Где:</strong> Секция с калькулятором (шаг 3)</p>
<p><strong>Поля:</strong> name, phone, email + данные расчета</p>
<p><strong>Обработчик:</strong> handleCalculatorFormSubmit()</p>
</div>
<a href="index.html#calculator" class="mt-4 inline-block text-blue-600 hover:text-blue-700">
<i class="fas fa-external-link-alt mr-1"></i> Открыть калькулятор
</a>
</div>
<!-- Form 4 -->
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-xl font-bold flex items-center">
<span class="bg-red-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">4</span>
Final CTA
</h3>
<input type="checkbox" class="w-6 h-6">
</div>
<div class="space-y-2 text-sm text-gray-600">
<p><strong>ID:</strong> <code class="bg-gray-100 px-2 py-1 rounded">form-final</code></p>
<p><strong>Тип:</strong> final</p>
<p><strong>Где:</strong> Финальная секция (внизу страницы)</p>
<p><strong>Поля:</strong> name, phone, email</p>
<p><strong>Обработчик:</strong> handleFormSubmit()</p>
</div>
<p class="mt-4 text-sm text-gray-500">
<i class="fas fa-info-circle mr-1"></i> Прокрутите страницу до конца
</p>
</div>
<!-- Form 5 -->
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-xl font-bold flex items-center">
<span class="bg-teal-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">5</span>
Consultant
</h3>
<input type="checkbox" class="w-6 h-6">
</div>
<div class="space-y-2 text-sm text-gray-600">
<p><strong>ID:</strong> <code class="bg-gray-100 px-2 py-1 rounded">form-consultant</code></p>
<p><strong>Тип:</strong> consultant</p>
<p><strong>Где:</strong> Виджет онлайн-консультанта (справа внизу)</p>
<p><strong>Поля:</strong> name, phone, email</p>
<p><strong>Обработчик:</strong> handleFormSubmit()</p>
</div>
<p class="mt-4 text-sm text-gray-500">
<i class="fas fa-info-circle mr-1"></i> Кликните на зеленый виджет справа внизу
</p>
</div>
<!-- Form 6 -->
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-xl font-bold flex items-center">
<span class="bg-orange-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">6</span>
Exit Case
</h3>
<input type="checkbox" class="w-6 h-6">
</div>
<div class="space-y-2 text-sm text-gray-600">
<p><strong>ID:</strong> <code class="bg-gray-100 px-2 py-1 rounded">form-exit-case</code></p>
<p><strong>Тип:</strong> exit-case</p>
<p><strong>Где:</strong> Exit Intent модал (при попытке уйти со страницы)</p>
<p><strong>Поля:</strong> name, phone, email</p>
<p><strong>Обработчик:</strong> handleFormSubmit()</p>
</div>
<p class="mt-4 text-sm text-gray-500">
<i class="fas fa-info-circle mr-1"></i> Проведите 2+ минут на сайте, затем двигайте мышь к выходу
</p>
</div>
<!-- Form 7 -->
<div class="bg-white rounded-lg shadow p-6">
<div class="flex items-center justify-between mb-4">
<h3 class="text-xl font-bold flex items-center">
<span class="bg-pink-600 text-white w-8 h-8 rounded-full flex items-center justify-center mr-3">7</span>
Exit Messenger
</h3>
<input type="checkbox" class="w-6 h-6">
</div>
<div class="space-y-2 text-sm text-gray-600">
<p><strong>ID:</strong> <code class="bg-gray-100 px-2 py-1 rounded">form-exit-messenger</code></p>
<p><strong>Тип:</strong> exit-messenger</p>
<p><strong>Где:</strong> Exit Intent модал (быстрый уход)</p>
<p><strong>Поля:</strong> name, phone, email</p>
<p><strong>Обработчик:</strong> handleFormSubmit()</p>
</div>
<p class="mt-4 text-sm text-gray-500">
<i class="fas fa-info-circle mr-1"></i> Сразу двигайте мышь к выходу после загрузки
</p>
</div>
</div>
<!-- Test Results -->
<div class="bg-white rounded-lg shadow-lg p-8 mt-6">
<h2 class="text-2xl font-bold mb-4">
<i class="fas fa-clipboard-check text-green-600 mr-2"></i>
Ожидаемые результаты
</h2>
<div class="space-y-4">
<div class="flex items-start space-x-3">
<i class="fas fa-check-circle text-green-600 mt-1"></i>
<div>
<p class="font-semibold">Редирект на success.php</p>
<p class="text-sm text-gray-600">После отправки формы должен произойти автоматический редирект</p>
</div>
</div>
<div class="flex items-start space-x-3">
<i class="fas fa-check-circle text-green-600 mt-1"></i>
<div>
<p class="font-semibold">URL параметры</p>
<p class="text-sm text-gray-600">В URL должны быть: type, name, broker, amount</p>
</div>
</div>
<div class="flex items-start space-x-3">
<i class="fas fa-check-circle text-green-600 mt-1"></i>
<div>
<p class="font-semibold">Телефон в правильном формате</p>
<p class="text-sm text-gray-600">В CRM должен прийти: КОД_СТРАНЫ + НОМЕР (без "+")</p>
</div>
</div>
<div class="flex items-start space-x-3">
<i class="fas fa-check-circle text-green-600 mt-1"></i>
<div>
<p class="font-semibold">Лид в CRM</p>
<p class="text-sm text-gray-600">Даже если ответ {"success":false} но http_code:200 - это успех (HOLD)</p>
</div>
</div>
<div class="flex items-start space-x-3">
<i class="fas fa-exclamation-triangle text-yellow-600 mt-1"></i>
<div>
<p class="font-semibold">Дубликаты</p>
<p class="text-sm text-gray-600">При повторной отправке того же email/phone → редирект на error.php</p>
</div>
</div>
</div>
</div>
<!-- Quick Links -->
<div class="grid md:grid-cols-3 gap-4 mt-6">
<a href="index.html" class="bg-blue-600 text-white rounded-lg p-4 text-center hover:bg-blue-700 transition">
<i class="fas fa-home mr-2"></i> Главная страница
</a>
<a href="test-form.html" class="bg-green-600 text-white rounded-lg p-4 text-center hover:bg-green-700 transition">
<i class="fas fa-flask mr-2"></i> Тестовая форма
</a>
<a href="CRM_INTEGRATION_GUIDE.md" class="bg-purple-600 text-white rounded-lg p-4 text-center hover:bg-purple-700 transition">
<i class="fas fa-book mr-2"></i> Документация
</a>
</div>
<!-- Console Debug -->
<div class="bg-gray-800 text-white rounded-lg p-6 mt-6">
<h3 class="font-bold text-lg mb-3">
<i class="fas fa-terminal text-yellow-400 mr-2"></i>
Отладка через Console
</h3>
<p class="text-sm text-gray-300 mb-3">Откройте Console (F12) и проверяйте:</p>
<pre class="bg-gray-900 p-3 rounded text-xs overflow-x-auto"><code>// Посмотреть все инициализированные формы
console.log('Form cold:', document.getElementById('form-cold'));
console.log('Form hot:', document.getElementById('form-hot'));
console.log('Form calculator:', document.getElementById('form-calculator'));
// Проверить intl-tel-input
const phone = document.querySelector('input[type="tel"]');
console.log('Phone ITI:', phone?.intlTelInputInstance);
// Посмотреть код страны
const iti = phone?.intlTelInputInstance;
console.log('Country data:', iti?.getSelectedCountryData());</code></pre>
</div>
</div>
</body>
</html>