Documentation

ShowInputCaptionImage

string
CFormOutput::ShowInputCaptionImage(
	string $FIELD_SID[,
	string $sAlign = "", 
	int $iMaxW = 0
	int $iMaxH = 0
	string $bPopup = "N", 
	string $strPopupTitle = "", 
	string $sHSpace = "", 
	string $sVSpace = "", 
	string $sBorder = ""
]

);

The method displays an image, attached to a web form question. If the image is available, HTML code for the insert is returned. Otherwise, empty string is returned. Non-static method.

Method parameters

Method parameters are identical to parameters of CFile::ShowImage

Parameter Description Available from version
FIELD_SID String ID for the question field. Required parameter.
sAlign Image location relative to text. Can have one of four values - LEFT, CENTER, RIGHT (case insensitive) or empty. Optional parameter. 5.1.2
iMaxW Maximum image width. If image width is larger than iMaxW, it will be proportionally scaled.
Optional. Prior to version 5.1.2, default value - "0" - without limits.
iMaxH Maximum image height. IF the image height is larger than iMaxH, it will proportionally scaled.
Optional. Prior to version 5.1.2 default value - "0" - without limits..
bPopup Defines if an additional popup window with the enlarged image is to be opened when clicking on an image.
Optional parameter. By default can have one of two values - "Y" or "N" (capitalization is respected). By default - "N" (until version 5.1.2 - "false")..
strPopupTitle Popup hint text at the image (only if bPopup = "Y")
Optional parameter. By default can have one of two values - "Y" or "N" (capitalization is respected). By default - "N" (until version 5.1.2 - "false").
sHSpace Sets vertical indent of image from the surrounding text in pixels.
Optional parameter. By default - "0" - without indent.
5.1.2
sVSpace Sets horizontal indent of image from the surrounding text in pixels.
Optional parameter. By default - "0" - without indent.
5.1.2
sBorder Sets the border width around an image. Optional. By default - "0", without a frame: 5.1.2

Returned value

Returns HTML code for the insert of image into the web form

Examples of use

<?=$FORM->ShowInputCaptionImage('MYFIELD_5', 'LEFT', 50, 50, "N", "", 5, 5)?>

See Also

  • CFormOutput Class
  • CFormOutput::ShowInput
  • CFormOutput::ShowInputCaption
  • CFormOutput::isInputCaptionImage


  • © «Bitrix24», 2001-2024
    Up