Answer the question
In order to leave comments, you need to log in
How to make fancybox not hide if no field is filled?
Hello. I have a feedback form on Bitrix. Here is the template
<?
if(!defined("B_PROLOG_INCLUDED")||B_PROLOG_INCLUDED!==true)die();
?>
<div class = "popul" id = "call">
<div class = "title">Обратный звонок</div>
<?if (!empty($arResult["ERROR_MESSAGE"])) {?>
<? foreach ($arResult["ERROR_MESSAGE"] as $v) { ?>
<? ShowError($v); ?>
<? } ?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#call').modal('show');
});
</script>
<? }
if (strlen($arResult["OK_MESSAGE"]) > 0) {
?>
<?=$arResult["OK_MESSAGE"] ?>
<script type="text/javascript">
jQuery(document).ready(function() {
jQuery('#call').modal('show');
});
</script>
<? }
?>
<form action="<?=POST_FORM_ACTION_URI?>" method="POST">
<?=bitrix_sessid_post()?>
<fieldset>
<label><?=GetMessage("MFT_NAME")?><?if(empty($arParams["REQUIRED_FIELDS"]) || in_array("NAME", $arParams["REQUIRED_FIELDS"])):?><span>*</span></label><?endif?>
<input type="text" name="user_name" value="<?=$arResult["AUTHOR_NAME"]?>">
</fieldset>
<fieldset>
<label><?=GetMessage("MFT_PHONE")?><?if(empty($arParams["REQUIRED_FIELDS"]) || in_array("PHONE", $arParams["REQUIRED_FIELDS"])):?><span>*</span></label><?endif?>
<input type="number_format" name="user_phone" value="<?=$arResult["AUTHOR_PHONE"]?>">
</fieldset>
<!-- <button type="submit" name="submit"><?=GetMessage("MFT_SUBMIT")?></button> !-->
<input class="btn" type="submit" name="submit" value="Перезвонить">
</form>
</div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question