<?php

namespace apexl\Io\modules\formbuilder\includes;

use apexl\Io\modules\formbuilder\includes\formField;

class inputField extends formField
{
    public function __construct($name, $type = 'text')
    {
        parent::__construct($name, 'input', $type);
    }

    public function setValue($value)
    {
        if (!is_array($value) && !is_object($value)) $this->field->value = (string)$value;
        else $this->field->value = $value;

        return $this;
    }


    public function setInputType($inputType)
    {
        $this->field->inputType = $inputType;
        return $this;
    }




}
