Bitrix There is a field selector in which you can select the status of the application. I give an example of a function that processes the selected value, assigns text to it and highlights it in the admin part:
function GetAdminListViewHTML($arProperty, $value, $strHTMLControlName) { $html = ''; if ($value['VALUE'] == '1'){ $html = '<div style="background: red; color: #fff; text-align: center"> ΠΠΎΠ΄Π³ΠΎΡΠΎΠ²ΠΊΠ° </div>'; }elseif ($value['VALUE'] == '2'){ $html = '<div style="background: green; color: #fff; text-align: center"> ΠΠΏΡΠ±Π»ΠΈΠΊΠΎΠ²Π°Π½ </div>'; }elseif ($value['VALUE'] == '3'){ $html = '<div style="background: silver; color: #000; text-align: center"> ΠΠΆΠΈΠ΄Π°Π΅Ρ ΠΏΡΠ±Π»ΠΈΠΊΠ°ΡΠΈΠΈ </div>'; } elseif ($value['VALUE'] == '4'){ $html = '<div style="background: lawngreen; color: #fff; text-align: center"> ΠΠ° ΡΠ°ΡΡΠΌΠΎΡΡΠ΅Π½ΠΈΠΈ </div>'; } elseif ($value['VALUE'] == '5'){ $html = '<div style="background: blue; color: #fff; text-align: center"> ΠΠ°Π²Π΅ΡΡΠ΅Π½ </div>'; } return $html; } There is a form for displaying general information about the application in the user part:
<div class="text-block"> <p>ΠΠ°ΡΠ° ΠΏΡΠ±Π»ΠΈΠΊΠ°ΡΠΈΠΈ: <strong><?= $arResult['DISPLAY_ACTIVE_FROM'] ?></strong></p> <p>Π‘ΡΠ°ΡΡΡ Π·Π°ΡΠ²ΠΊΠΈ: <?= $arProps['STATYS']['VALUE'] ?></p> <p>ΠΠ°ΡΠ° ΠΏΡΠΈΠ½ΡΡΠΈΡ Π’Π΅Ρ
Π½ΠΈΡΠ΅ΡΠΊΠΎΠΉ ΡΠ°ΡΡΠΈ: <strong><?= $arProps['PRIT']['VALUE'] ?></strong></p> <? if ($arProps['PRODT']['VALUE']) { ?> <p> ΠΠ°ΡΠ° ΠΏΡΠΎΠ΄Π»Π΅Π½ΠΈΡ Π’Π΅Ρ
Π½ΠΈΡΠ΅ΡΠΊΠΎΠΉ ΡΠ°ΡΡΠΈ: <strong><?= $arProps['PRODT']['VALUE'] ?></strong></p> <? } ?> <p>ΠΠ°ΡΠ° ΠΏΡΠΈΠ½ΡΡΠΈΡ ΠΠΎΠΌΠΌΠ΅ΡΡΠ΅ΡΠΊΠΎΠΉ ΡΠ°ΡΡΠΈ: <strong><?= $arProps['PRIK']['VALUE'] ?></strong></p> <? if ($arProps['PRODK']['VALUE']) { ?> <p> ΠΠ°ΡΠ° ΠΏΡΠΎΠ΄Π»Π΅Π½ΠΈΡ ΠΠΎΠΌΠΌΠ΅ΡΡΠ΅ΡΠΊΠΎΠΉ ΡΠ°ΡΡΠΈ: <strong><?= $arProps['PRODK']['VALUE'] ?></strong></p> <? } ?> <p>Π‘ΠΏΠ΅ΡΠΈΠ°Π»ΠΈΡΡ Π¦ΠΠ: <strong><?= $arProps['SPEC']['VALUE'] ?></strong>, ΡΠ΅Π»Π΅ΡΠΎΠ½: <?= $arProps['PHONE']['VALUE'] ?>, e-mail: <a href="mailto:<?= $arProps['EMAIL']['VALUE'] ?>"><?= $arProps['EMAIL']['VALUE'] ?></a></p> </div> When displaying the property <p>Π‘ΡΠ°ΡΡΡ Π·Π°ΡΠ²ΠΊΠΈ: <?= $arProps['STATYS']['VALUE'] ?></p> , the array value is equal to two, and the text and color should be assigned to this value. Help who can.