N
N
Nikolai2018-06-20 14:18:32
1C-Bitrix
Nikolai, 2018-06-20 14:18:32

Custom property template not applied?

Hello! I can't figure out why my own template isn't applied. From the bitrix\components\bitrix\system.field.edit folder, I transferred only the folder with the list template to my template.

<?foreach ($arResult["USER_PROPERTIES"]["DATA"] as $FIELD_NAME => $arUserField):?>
        <? $sTemplate = $arUserField["USER_TYPE"]["USER_TYPE_ID"];

          if ($FIELD_NAME == "UF_TEST") {
            $sTemplate = "custom-select";
          }

        ?>
      <tr><td class="field-name">
        <?if ($arUserField["MANDATORY"]=="Y"):?>
          <span class="starrequired">*</span>
        <?endif;?>
        <?=$arUserField["EDIT_FORM_LABEL"]?>:</td><td class="field-value">
          <?$APPLICATION->IncludeComponent(
            "bitrix:system.field.edit",
            $sTemplate,
            array("bVarsFromForm" => $arResult["bVarsFromForm"], "arUserField" => $arUserField), null, array("HIDE_ICONS"=>"Y"));?></td></tr>
      <?endforeach;?>

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
Ivan Ivanov, 2018-06-20
@nikolay_akhmetyanov

Answer in the comments

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question