компонента , заглядываем в шаблон
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
<? $APPLICATION->IncludeComponent("bitrix:form.result.new", "main", Array( "SEF_MODE" => "Y", "WEB_FORM_ID" => 1, "LIST_URL" => "", "EDIT_URL" => "", "SUCCESS_URL" => "", "CHAIN_ITEM_TEXT" => "", "CHAIN_ITEM_LINK" => "", "IGNORE_CUSTOM_TEMPLATE" => "Y", "USE_EXTENDED_ERRORS" => "Y", "CACHE_TYPE" => "A", "CACHE_TIME" => "3600", "VARIABLE_ALIASES" => Array(), 'REDIRECT' => 'N', ) ); ?> |
вывод чебокса
1 2 3 |
<label class="checkbox" for="agreement2">Я хочу следить за появлениям лучших предложений <input id="agreement2" type="checkbox" name="form_<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_208']['STRUCTURE']['0']['FIELD_TYPE'] ?>_<?= 'SIMPLE_QUESTION_208[]' ?>" value="<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_208']['STRUCTURE']['0']['ID'] ?>"><span class="checkmark"></span> </label> |
весь код шаблона
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 |
<? if (!defined("B_PROLOG_INCLUDED") || B_PROLOG_INCLUDED !== true) die(); ?> <? if ($arResult["isFormErrors"] == "Y"): ?><?= $arResult["FORM_ERRORS_TEXT"]; ?><? endif; ?> <?= $arResult["FORM_NOTE"] ?> <? if ($arResult["isFormNote"] != "Y") { //pre($arResult["QUESTIONS"]); ?> <div data-type="messange-after-submit"></div> <div class="product-cart__form"> <div class="product-cart__form-img"><img src="/local/frontend/images/products/pr_cart_form.png" alt="img" srcset="/local/frontend/images/products/pr_cart_form.png 1x, /local/frontend/images/products/pr_cart_form_2x.png 2x, /local/frontend/images/products/pr_cart_form_3x.png 3x"/></div> <div class="product-cart__form-form"> <?= $arResult["FORM_HEADER"] ?> <? /*********************************************************************************** * form questions ***********************************************************************************/ ?> <div class="product-cart__form-form-heading">Мы видим какой товар вас особенно заинтересовал</div> <div class="product-cart__form-form-text">Оставьте заявку, и наши менеджеры сделают для вас специальное предлоение!</div> <div class="product-cart__form-form-group"> <div class="input"><span><?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_497']['CAPTION'] ?></span> <input type="text" placeholder="<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_497']['CAPTION'] ?>" pattern="^[A-Za-zА-Яа-яЁё]+$" required name="form_<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_497']['STRUCTURE']['0']['FIELD_TYPE'] ?>_<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_497']['STRUCTURE']['0']['ID'] ?>"/> </div> <div class="input"><span><?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_676']['CAPTION'] ?></span> <input type="tel" placeholder="<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_676']['CAPTION'] ?>" required name="form_<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_676']['STRUCTURE']['0']['FIELD_TYPE'] ?>_<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_676']['STRUCTURE']['0']['ID'] ?>"/> </div> <button class="button-danger product-cart__form-submit" type="submit" data-action="send-contacts-form" data-popup="#subscribe-popup" name="web_form_apply" value="<?= GetMessage("FORM_APPLY") ?>"> Подписаться </button> </div> <div class="product-cart__form-form-group"> <label class="checkbox" for="agree">Согласен на <a class="link-underlined" href="/personal-data/" target="_blank">обработку персональных данных</a> <input id="agree" type="checkbox" name="form_checkbox<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_380']['STRUCTURE']['0']['FIELD_TYPE'] ?>_<?= 'SIMPLE_QUESTION_238[]' ?>" value="<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_238']['STRUCTURE']['0']['ID'] ?>"/><span class="checkmark"></span> </label> <label class="checkbox" for="agreement2">Я хочу следить за появлениям лучших предложений <input id="agreement2" type="checkbox" name="form_<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_208']['STRUCTURE']['0']['FIELD_TYPE'] ?>_<?= 'SIMPLE_QUESTION_208[]' ?>" value="<?= $arResult["QUESTIONS"]['SIMPLE_QUESTION_208']['STRUCTURE']['0']['ID'] ?>"><span class="checkmark"></span> </label> </div> <input type="hidden" name="web_form_apply" value="Y"/> <input type="hidden" name="action" value="sendContactsForm"/> <input type="hidden" name="ajaxCatalog" value="Y"/> <?= $arResult["FORM_FOOTER"] ?> </div> <div class="popup popup_hiden" id="subscribe-popup"> <div class="popup__content"> <div class="popup__close"> <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24"> <path fill="#4D7399" fill-rule="evenodd" d="" transform="rotate(45 12 12)"/> </svg> </div> <h2 class="heading-1">Вы успешно подписались</h2> <div class="popup__result-group"> <div class="popup__result-text"> </div> <div class="popup__result-img"><img src="/local/frontend/images/tick.jpg" alt="img"/></div> </div> </div> </div> </div> <? } //endif (isFormNote) ?> |