ShowFormImage
string CFormOutput::ShowFormImage( [ string $sAlign = "", int $iMaxW = 0 int $iMaxH = 0 string $bPopup = "N", string $strPopupTitle = "", string $sHSpace = "", string $sVSpace = "", string $sBorder = "" ] );
This method displays an image, attached to the web form description. Non-static method.
Method parameters
Method parameters are identical to parameters of CFile::ShowImage
Parameter | Description | Available from version |
---|---|---|
sParams | Optional parameter. Default value - "border=\"0\"". | Deleted from version 5.1.2 onwards |
strImageUrl | Optional parameter. | Deleted from version 5.1.2 onwards |
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 proportionally scaled. Optional parameter. By default - "0" - without limits. |
|
iMaxH | Maximum image height. If image height is larger than iMaxH, it will proportionally scaled. Optional parameter. By default - "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 "Click to enlarge" phrase is displayed in the page language (prior to version 5.1.2 default value - "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 to insert image into a web form
Example of use
<?=$FORM->ShowFormImage("CENTER", 250, 250, "Y", GetMessage("FORM_ENLARGE"), 0, 0)?>
See Also
© «Bitrix24», 2001-2024