Documentation

isInputCaptionImage

bool
CFormOutput::isInputCaptionImage(
	string FIELD_SID
);

Checks the condition "is image attached to the question with this ID". Non-static method.

Method parameters

Parameter Description
FIELD_SID Question field string ID. Required parameter.

Returned value

If image is attached to the question, returns true or false otherwise.

Examples of use

<?=$FORM->ShowInputCaption('MYFIELD_5')?>:
<?=$FORM->ShowInput('MYFIELD_5')?><br />
<?if($FORM->isInputCaptionImage('MYFIELD_5')):?>
	<?=$FORM->ShowInputCaptionImage('MYFIELD_5')?>
<?else:?>
	<?=CFile::ShowImage("/myimages/form_field_default.jpg")?>
<?endif?>:

See Also

  • CFormOutput class
  • CFile::ShowImage
  • CFormOutput::ShowInput
  • CFormOutput::ShowInputCaption
  • CFormOutput::ShowInputCaptionImage


  • © «Bitrix24», 2001-2024
    Up