CBPHelper::getFieldInputControl

  1. Bitrix24 API (v. 23.675.0)
  2. bizproc
  3. CBPHelper
  4. getFieldInputControl
  • Модуль: bizproc
  • Путь к файлу: ~/bitrix/modules/bizproc/classes/general/helper.php
  • Класс: CBPHelper
  • Вызов: CBPHelper::getFieldInputControl
static function getFieldInputControl($documentType, $arFieldType, $arFieldName, $fieldValue, $bAllowSelection = false)
{
	if (!is_array($fieldValue) || is_array($fieldValue) && CBPHelper::IsAssociativeArray($fieldValue))
	{
		$fieldValue = array($fieldValue);
	}

	ob_start();

	if ($arFieldType["Type"] == "select")
	{
		$fieldValueTmp = $fieldValue;
		?>
		
		
			
_text" name="_text" value=" 0) { $a = array_values($fieldValueTmp); echo htmlspecialcharsbx($a[0]); } ?>">" name="" value=""> '; if ($bAllowSelection) { $arFieldType["BaseType"] = "string"; static $arDocumentTypes = null; if (is_null($arDocumentTypes)) $arDocumentTypes = self::GetDocumentFieldTypes($documentType); if (array_key_exists($arFieldType["Type"], $arDocumentTypes)) $arFieldType["BaseType"] = $arDocumentTypes[$arFieldType["Type"]]["BaseType"]; } $fieldValueTmp = $fieldValue; $ind = -1; foreach ($fieldValue as $key => $value) { $ind++; $fieldNameId = 'id_'.$arFieldName["Field"].'__n'.$ind.'_'; $fieldNameName = $arFieldName["Field"].($arFieldType["Multiple"] ? "[n".$ind."]" : ""); if ($arFieldType["Multiple"]) echo ''; switch ($arFieldType["Type"]) { case "int": case "double": unset($fieldValueTmp[$key]); ?> '; } if ($arFieldType["Multiple"]) echo ""; if ($arFieldType["Multiple"]) echo '
'; if ($bAllowSelection) { if (in_array($arFieldType["Type"], array("file", "bool", "date", "datetime"))) { ?> _text" name="_text" value=" 0) { $a = array_values($fieldValueTmp); echo htmlspecialcharsbx($a[0]); } ?>">

Добавить комментарий