Hi! Could we please enable some services and cookies to improve your experience and our website?
Online Sandbox for SQL and PHP: Write, Run, Test, and Share SQL Queries and PHP Code
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die();
if ($arResult["isFormErrors"] == "Y") : ?><?= $arResult["FORM_ERRORS_TEXT"]; ?><? endif; ?>
<? if ($arResult["isFormNote"] != "Y") {
?>
<?= $arResult["FORM_HEADER"] ?>
<div class="contact-form">
<div class="contact-form__head">
<div class="contact-form__head-title">Связаться</div>
<div class="contact-form__head-text">Наши сотрудники помогут выполнить подбор услуги и расчет цены с учетом
ваших требований
</div>
</div>
<form class="contact-form__form" action="/" method="POST">
<?
foreach ($arResult["QUESTIONS"] as $FIELD_SID => $arQuestion) {
if ($arQuestion['STRUCTURE'][0]['FIELD_TYPE'] == 'hidden') {
echo $arQuestion["HTML_CODE"];
} else {
// Опредленеие классов для блока
$class = "input contact-form__input";
$for = "medicine_";
$warning = null;
if ($arQuestion['STRUCTURE'][0]['ID'] == 1) {
$for .= 'name';
$warning = "Поле должно содержать не менее 3-х символов";
}
if ($arQuestion['STRUCTURE'][0]['ID'] == 2) {
$for .= 'company';
$warning = "Поле должно содержать не менее 3-х символов";
}
if ($arQuestion['STRUCTURE'][0]['ID'] == 3) {
$for .= 'email';
$warning = "Неверный формат почты";
}
if ($arQuestion['STRUCTURE'][0]['ID'] == 4) {
$for .= 'phone';
}
if ($arQuestion['STRUCTURE'][0]['ID'] == 5) {
$for .= 'message';
$class = "contact-form__form-message";
}
?>
<div class="<?= $class ?>"><label class="input__label" for="<?= $for ?>">
<div class="input__label-text"><?= $arQuestion["CAPTION"] ?><? if ($arQuestion["REQUIRED"] == "Y") : ?><?= $arResult["REQUIRED_SIGN"]; ?><? endif; ?></div>
<div class="input__input" id="medicine_message"> <?= $arQuestion["HTML_CODE"] ?> </div>
<div class="input__notification"><?= $warning ?? '' ?></div>
</label></div>
<? if (is_array($arResult["FORM_ERRORS"]) && array_key_exists($FIELD_SID, $arResult['FORM_ERRORS'])) : ?>
<span class="error-fld" title="<?= htmlspecialcharsbx($arResult["FORM_ERRORS"][$FIELD_SID]) ?>"></span>
<? endif; ?>
<!-- <?= $arQuestion["CAPTION"] ?><? if ($arQuestion["REQUIRED"] == "Y") : ?><?= $arResult["REQUIRED_SIGN"]; ?><? endif; ?> -->
<?= $arQuestion["IS_INPUT_CAPTION_IMAGE"] == "Y" ? "<br />" . $arQuestion["IMAGE"]["HTML_CODE"] : "" ?>
<?
}
} //endwhile
?>
<!-- <div class="input contact-form__input"><label class="input__label" for="medicine_company">
<div class="input__label-text">Компания/Должность*</div>
<input class="input__input" type="text" id="medicine_company" name="medicine_company" value="" required="">
<div class="input__notification">Поле должно содержать не менее 3-х символов</div>
</label></div>
<div class="input contact-form__input"><label class="input__label" for="medicine_email">
<div class="input__label-text">Email*</div>
<input class="input__input" type="email" id="medicine_email" name="medicine_email" value="" required="">
<div class="input__notification">Неверный формат почты</div>
</label></div>
<div class="input contact-form__input"><label class="input__label" for="medicine_phone">
<div class="input__label-text">Номер телефона*</div>
<input class="input__input" type="tel" id="medicine_phone" data-inputmask="'mask': '+79999999999', 'clearIncomplete': 'true'" maxlength="12" x-autocompletetype="phone-full" name="medicine_phone" value="" required="">
</label></div>
</div>
<div class="contact-form__form-message">
<div class="input"><label class="input__label" for="medicine_message">
<div class="input__label-text">Сообщение</div>
<textarea class="input__input" type="text" id="medicine_message" name="medicine_message" value=""></textarea>
<div class="input__notification"></div>
</label></div>
</div> -->
<div class="contact-form__bottom">
<div class="contact-form__bottom-policy">Нажимая «Отправить», Вы подтверждаете, что
ознакомлены, полностью согласны и принимаете условия «Согласия на обработку персональных
данных».
</div>
<button class="form-button contact-form__bottom-button" data-success="Отправлено" data-error="Ошибка отправки" <?= (intval($arResult["F_RIGHT"]) < 10 ? "disabled=\"disabled\"" : ""); ?>>
<div class="form-button__title">Оставить заявку</div>
</button>
</div>
</form>
</div>
<?= $arResult["REQUIRED_SIGN"]; ?> - <?= GetMessage("FORM_REQUIRED_FIELDS") ?>
<?= $arResult["FORM_FOOTER"] ?>
<?
} //endif (isFormNote)