Documentation

GetPublicEditHTML

string
CIBlockProperty*::GetPublicEditHTML(
array arProperty,
array value,
array strHTMLControlName
);

The method returns HTML to show control element for editing property values in the public site section. Method is static when using standard properties. Must be static for properties, created by client when using php7.

Call parameters

Parameter Description
arProperty
Property metadata. See Structure for Iblock Module Tables
valueProperty value. Array type:
array(
"VALUE" => value,
"DESCRIPTION" => description,
);
strHTMLControlNameNames 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,
"FORM_NAME" => form name to have in-built control element.
);

Returned value

String.

See Also

Examples

<?
class CIBlockPropertyMyDateTime
{
//Show calendar component.
function GetPublicEditHTML($arProperty, $value, $strHTMLControlName)
{
$s = '<input type="text" name="'.htmlspecialchars($strHTMLControlName["VALUE"]).'" size="25" value="'.htmlspecialchars($value["VALUE"]).'" />';
ob_start();
$GLOBALS["APPLICATION"]->IncludeComponent(
'bitrix:main.calendar',
'',
array(
'FORM_NAME' => $strHTMLControlName["FORM_NAME"],
'INPUT_NAME' => $strHTMLControlName["VALUE"],
'INPUT_VALUE' => $value["VALUE"],
),
null,
array('HIDE_ICONS' => 'Y')
);
$s .= ob_get_contents();
ob_end_clean();
return $s;
}
}
?>


© «Bitrix24», 2001-2024
Up