GetPropertyFieldHtml
string
CIBlockProperty*::GetPropertyFieldHtml(
array arProperty,
array value,
array strHTMLControlName
);
The method must return safe HTML for displaying control element for editing property values in the admin section. Method is static when using standard properties. Must be static for properties, created by client when using php7.
Note: the method is called when building element editing form.
Call parameters
Parameter | Description |
---|---|
arProperty
| Property metadata. See Structure for Iblock Module Tables |
value | Property value. Array type:
array( "VALUE" => value, "DESCRIPTION" => description, ); |
strHTMLControlName | Names of control elements for filling-in the property and its description. Array type:
array( "VALUE" => html safe name for value, "DESCRIPTION" => html safe name for description, "MODE" => can have the value "FORM_FILL" when calling from element edit form or "iblock_element_admin" when editing in the element list view mode, as well as "EDIT_FORM" when editing an iblock. "FORM_NAME" => form name to have in-built control element. ); |
Returned value
String.
See Also
Examples
<?
class CIBlockPropertyMyDateTime
{
function GetPropertyFieldHtml($arProperty, $value, $strHTMLControlName)
{
return CAdminCalendar::CalendarDate($strHTMLControlName["VALUE"], $value["VALUE"], 20).
($arProperty["WITH_DESCRIPTION"]=="Y"?
' <input type="text" size="20" name="'.$strHTMLControlName["DESCRIPTION"].'" value="'.htmlspecialchars($value["DESCRIPTION"]).'">'
:''
);
}
}
?>
© «Bitrix24», 2001-2024