File: D:/HostingSpaces/SBogers59/ferrumbv.nl/wwwroot/lib/form/types/field_type_textarea.class.php
<?php
/**
* field_type_text.class.php
* Created by Komma Mediadesign.
* Author: mike
* Date: 13/12/13
*/
class Field_Type_Textarea extends Form_Field
{
public function __construct()
{
parent::__construct();
}
/*
* Create output
* @return string
*/
public function generate()
{
$err = isset($_SESSION[$this->formName . '_errors'][$this->name]);
$output = '';
$output .= '<div class="input_holder textarea_holder';
if($err) $output .= ' error';
$output .= '">';
if($err) $output .= '<span class="error">' . $_SESSION[$this->formName . '_errors'][$this->name] . '</span>';
$output .= '<label for="' . $this->name . '">' . $this->label . '</label>
<textarea name="' . $this->name . '" id="' . $this->name . '" data-label="' . $this->placeholder . '">' . $this->value .'</textarea>';
if( isset($_SERVER['HTTP_USER_AGENT']) && ! strstr($_SERVER['HTTP_USER_AGENT'],'iPhone')) $output .= '<span class="placeholder">' . $this->placeholder . '</span>';
$output .= '</div>';
return $output;
}
}