Answer the question
In order to leave comments, you need to log in
Why is click fired instead of submit?
Standard feedback form of one Bitrix template
<h2><?=GetMessage("MFT_ORDER")?></h2>
<?if(!empty($arResult["ERROR_MESSAGE"]))
{
foreach($arResult["ERROR_MESSAGE"] as $v)
ShowError($v);
}
if(strlen($arResult["OK_MESSAGE"]) > 0)
{
?><div class="mf-ok-text"><?=$arResult["OK_MESSAGE"]?></div><?
}
?>
<p class="note"><span><?=GetMessage("MFT_REQUIRED")?></span></p>
<form action="<?=POST_FORM_ACTION_URI?>#feedback" method="POST" class="form-main">
<?=bitrix_sessid_post()?>
<div class="form-left">
<fieldset>
<label for="popup-order-name">
<?=GetMessage("MFT_NAME")?><?if(empty($arParams["REQUIRED_FIELDS"]) || in_array("NAME", $arParams["REQUIRED_FIELDS"])):?><span class="mf-req">*</span><?endif?>
</label>
<input type="text" name="user_name" value="<?=$arResult["AUTHOR_NAME"]?>" id="popup-order-name" />
</fieldset>
<fieldset>
<label for="popup-order-email">
<?=GetMessage("MFT_EMAIL")?><?if(empty($arParams["REQUIRED_FIELDS"]) || in_array("EMAIL", $arParams["REQUIRED_FIELDS"])):?><span class="mf-req">*</span><?endif?>
</label>
<input id="popup-order-email" type="text" name="user_email" value="<?=$arResult["AUTHOR_EMAIL"]?>">
</fieldset>
<fieldset>
<label for="popup-order-phone">
<?=GetMessage("MFT_PHONE")?><?if(empty($arParams["REQUIRED_FIELDS"]) || in_array("PHONE", $arParams["REQUIRED_FIELDS"])):?><span class="mf-req">*</span><?endif?>
</label>
<input id="popup-order-phone" type="text" name="user_phone" value="<?=$arResult["AUTHOR_PHONE"]?>">
</fieldset>
</div>
<div class="form-right">
<fieldset>
<label for="popup-order-msg">
<?=GetMessage("MFT_MESSAGE")?><?if(empty($arParams["REQUIRED_FIELDS"]) || in_array("MESSAGE", $arParams["REQUIRED_FIELDS"])):?><span class="mf-req">*</span><?endif?>
</label>
<textarea name="MESSAGE" id="popup-order-msg"><?=$arResult["MESSAGE"]?></textarea>
</fieldset>
</div>
<div class="clearfix"></div>
<div class="text-center">
<button type="submit" name="submit_contact" value="<?=GetMessage("MFT_SUBMIT")?>" class="btn btn-big"><span><?=GetMessage("MFT_SUBMIT")?></span></button>
</div>
</div>
<script>
$( "form" ).submit(function( ) {
yaCounterXXXXXXXXX.reachGoal('CALL'); return true;
});
</script>
</form>
<form ......................... onsubmit=..............>
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