HEX
Server: Microsoft-IIS/8.5
System: Windows NT YDAWBH120 6.3 build 9600 (Windows Server 2012 R2 Standard Edition) AMD64
User: tentjecom_web (0)
PHP: 7.4.14
Disabled: NONE
Upload Files
File: D:/HostingSpaces/PvdBoogaard/indoorski.nl/backup/oude-site/cms/api/form/class.field.empty.php
<?php

/**
 * This file contains the iwp_field_empty class
 *
 * @version $Id$
 * @author Gwilym Evans <gwilym.evans@interspire.com>
 *
 * @package IWP
 * @subpackage IWP_FormFields
 */

/**
 * Empty Field Class
 * This class is used by the api form class to generate a field which renders nothing into the area that would otherwise contain an input field. For presentational or client-side purposes you can use $fieldObject->template->Assign('inputField', 'content') to specify custom content.
 *
 * @package IWP
 * @subpackage IWP_FormFields
 */

class iwp_field_empty extends iwp_field {
	/**
	 * This is the form field type of the field
	 *
	 * @var string
	 */
	public $type = 'empty';

	/**
	 * For holding whether the label should be shown for this field or not
	 *
	 * @var Boolean
	**/
	protected $showLabel = true;

	/**
	 * HTML code inserted in placeholder area
	 *
	 * @var string
	 */
	public $html = '';

	/**
	 * __construct
	 * The constructor which calls the parent constructor that sets up the field name if it is passed in during the initialization
	 *
	 * @var string
	 */
	public function __construct($name=null){
		parent::__construct($name);
	}

	/**
	 * GetFieldOutput
	 * Returns the HTML for this field. It generates the relevant parts, assigns them to template variables and returns a parse template file.
	 *
	 * @return string Returns the field HTML
	 */
	public function GetFieldOutput ($setOnly=false){
		$inputField = $this->Prepend . $this->html . $this->Append;

		parent::GetFieldOutput();

		$this->template->Assign('FieldName', $this->FieldName);
		$this->template->Assign('inputField', $inputField);

		if(!$setOnly){
			return $this->template->ParseTemplate('form.field', true);
		}
		return '';
	}

	/**
	 * Validate
	 * This is the function that data for this field is passed to to ensure it was submitted properly.
	 *
	 * @return string|boolean If the data is not valid, it will return false, if it is valid it will return a value
	 */
	public function Validate($arrData){
		return true;
	}
}