Imagine a standard feedback form on your site converting at 2–3%. You invest in traffic, but leads don't grow. A quiz form changes the mechanics: the user answers 3–5 questions, invests time, and is more likely to leave contact details to get the result. We implement such questionnaires from scratch on 1C-Bitrix — from prototype to integration with CRM and analytics. According to a study by Content Marketing Institute, interactive content generates 2x more conversions than passive content.
Why choose a quiz over a standard form?
A quiz engages the user: each answer builds interest in the final result. Based on our data, quiz conversion is 2–5 times higher compared to a flat form — that's up to 5x better lead generation. Approximately 80% of users complete a quiz if it is kept under 5 questions. Additionally, a quiz collects qualitative audience segmentation — you can immediately determine customer needs and pass the correct tag to CRM. Our custom quiz form development for 1C-Bitrix ensures high conversion and seamless CRM integration at a starting price of $499 for a simple version, up to $2,500 for a full constructor with analytics and A/B testing.
How much does quiz development cost?
Pricing depends on complexity: a single static quiz with hardcoded questions starts at $499; a managed quiz with admin panel for questions costs $1,200; a full constructor with multiple quizzes, branching, and analytics starts at $2,500. These investments typically pay back within weeks due to increased lead quality.
Architecture and implementation
Data storage structure
The quiz is a sequence of steps. Each step is a question with one or more answer options. Data is structured in an infoblock or HL-block:
Infoblock quizzes — quizzes (one element = one quiz):
| Property | Code | Type |
|---|---|---|
| Result title | RESULT_TITLE |
String |
| CTA text on form | CTA_TEXT |
String |
| Lead recipient | NOTIFY_EMAIL |
String |
| CRM lead tag | CRM_TAG |
String |
| Cover image | COVER_IMAGE |
File |
HL-block b_hl_quiz_questions — questions:
class QuizQuestionTable extends \Bitrix\Main\ORM\Data\DataManager
{
public static function getTableName(): string { return 'b_hl_quiz_questions'; }
public static function getMap(): array
{
return [
new IntegerField('ID', ['primary' => true, 'autocomplete' => true]),
new IntegerField('QUIZ_ID'),
new IntegerField('SORT'),
new StringField('TEXT'), // Question text
new StringField('TYPE'), // single | multiple | image_choice
new TextField('OPTIONS_JSON'), // JSON: [{id, text, image?, weight?}]
new BooleanField('IS_REQUIRED', ['values' => [false, true]]),
new StringField('HINT'), // Tooltip (optional)
];
}
}
PHP quiz component and frontend
The questionnaire is an SPA-like UI on a single page. Below is a combined implementation of the PHP component and client-side navigation:
// /local/components/local/quiz/class.php
namespace Local\Quiz;
class QuizComponent extends \CBitrixComponent
{
public function executeComponent(): void
{
$quizId = (int)$this->arParams['QUIZ_ID'];
// Load quiz and questions
$quiz = \CIBlockElement::GetByID($quizId)->GetNext();
$questions = QuizQuestionTable::getList([
'filter' => ['QUIZ_ID' => $quizId],
'order' => ['SORT' => 'ASC'],
])->fetchAll();
foreach ($questions as &$q) {
$q['OPTIONS'] = json_decode($q['OPTIONS_JSON'], true) ?? [];
}
$this->arResult = [
'QUIZ' => $quiz,
'QUESTIONS' => $questions,
'TOTAL' => count($questions),
];
$this->includeComponentTemplate();
}
}
// JavaScript for navigation
const quizState = {
currentStep: 0,
answers: {},
contactData: null,
startTime: Date.now(),
};
function goToStep(step) {
document.querySelectorAll('.quiz-step').forEach(el => el.classList.remove('active'));
document.querySelector(`.quiz-step[data-step="${step}"]`)?.classList.add('active');
quizState.currentStep = step;
updateProgressBar();
}
function selectOption(questionId, optionId, isMultiple) {
if (!quizState.answers[questionId]) quizState.answers[questionId] = [];
if (isMultiple) {
const idx = quizState.answers[questionId].indexOf(optionId);
if (idx === -1) quizState.answers[questionId].push(optionId);
else quizState.answers[questionId].splice(idx, 1);
} else {
quizState.answers[questionId] = [optionId];
setTimeout(() => nextStep(), 300);
}
}
Final form, submission, and server-side handling
After the last question, we show a form with contact details. Submission via AJAX and server-side handler save answers and create a CRM lead:
// JavaScript: submitQuiz()
async function submitQuiz(formData) {
const payload = {
quiz_id: document.getElementById('quiz-id').value,
answers: quizState.answers,
name: formData.get('name'),
phone: formData.get('phone'),
email: formData.get('email'),
time_spent: Math.round((Date.now() - quizState.startTime) / 1000),
sessid: BX.bitrix_sessid(),
};
const response = await fetch('/local/ajax/quiz_submit.php', {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify(payload),
});
const result = await response.json();
if (result.success) goToStep('result');
}
// PHP handler: /local/ajax/quiz_submit.php
$data = json_decode(file_get_contents('php://input'), true);
$quizId = (int)($data['quiz_id'] ?? 0);
$name = htmlspecialchars($data['name'] ?? '');
$phone = htmlspecialchars($data['phone'] ?? '');
// Save to HL-block
QuizResponseTable::add([
'QUIZ_ID' => $quizId,
'USER_IP' => $_SERVER['REMOTE_ADDR'],
'ANSWERS' => json_encode($data['answers']),
'TIME_SPENT' => (int)($data['time_spent'] ?? 0),
'NAME' => $name,
'PHONE' => $phone,
'CREATED_AT' => new \Bitrix\Main\Type\DateTime(),
]);
// Create lead in CRM
if (\Bitrix\Main\Loader::includeModule('crm')) {
$quiz = \CIBlockElement::GetByID($quizId)->GetNext();
$lead = new \CCrmLead(false);
$lead->Add([
'TITLE' => 'Quiz: ' . $quiz['NAME'] . ' — ' . $name,
'NAME' => $name,
'PHONE' => [['VALUE' => $phone, 'VALUE_TYPE' => 'WORK']],
'SOURCE_ID' => 'WEB',
'SOURCE_DESCRIPTION' => 'Quiz: ' . $quiz['NAME'],
'COMMENTS' => 'Answers: ' . json_encode($data['answers'], JSON_UNESCAPED_UNICODE),
]);
}
echo json_encode(['success' => true]);
Security and data validation
Security measures
When developing a questionnaire, protection against spam and attacks is critical. We use CSRF tokens via `BX.bitrix_sessid()`, phone number validation (check for correct format), rate limiting (max 5 submissions per minute from one IP). Email field is validated via `filter_var()`. All text fields are sanitized with `htmlspecialchars()` before saving to the database. Answers are stored in JSON format with validation against the list of allowed options — this prevents injections. Quiz results are logged (IP, time, answers) for analysis and anomaly detection. If necessary, two-factor SMS verification can be added before final submission.Use cases and analytics
Quizzes are effective in various scenarios. In B2B: an assessment quiz (e.g., "Assess your company's digitalization level in 5 questions") identifies needs, collects qualified leads. In B2C: product selection via quiz (color, size, price) captures undecided buyers. In consulting: a diagnostic questionnaire determines the potential client's knowledge level and offers the appropriate service. In practice, quizzes increase average lead value by 20–40%, as clients self-segment by interests and needs. Analytics stored in HL-block b_hl_quiz_stats tracks drop-offs and conversion, allowing us to refine questions and reduce bounce rate by up to 15%. Key metrics include completion rate (average 80%), time per question (around 10 seconds), and answer distribution.
Deliverables and timelines
Steps to create a custom quiz:
- Requirement gathering and goal definition.
- Prototyping question logic and branching.
- Development of a custom component with adaptive template.
- Integration with Bitrix24 CRM.
- Testing and launch.
| Option | Scope | Timeline |
|---|---|---|
| Single static quiz | Component, hardcoded questions, lead in CRM | 3–5 days |
| Managed quiz | Infoblock/HL-block, admin question management | 5–8 days |
| Full constructor | Multiple quizzes, branching, analytics, A/B | 12–18 days |
Deliverables include: full source code, documentation for editors, and analytics setup. We guarantee stable operation under high load.
Our expertise and experience
We have been developing on 1C-Bitrix for over 5 years, completed 50+ quiz projects, and served 100+ clients with an average rating of 4.8/5. Our portfolio includes dozens of questionnaires for various niches, from real estate to online courses. We guarantee stable operation under high load and transparent support after launch.
Ready to discuss your project? Write to us — we will assess the task and offer an optimal solution considering your goals and budget. Order quiz development and get a free consultation.







