예제 #1
0
 /**
  * Render the FormObject and set its id
  *
  * @return string
  */
 public function render()
 {
     // Set the proper ID according to the label
     $this->setId();
     // Encode HTML value
     $isButton = $this instanceof Field ? $this->isButton() : false;
     if (!$isButton and is_string($this->value)) {
         $this->value = Helpers::encode($this->value);
     }
     return parent::render();
 }
예제 #2
0
파일: Hidden.php 프로젝트: laralite/form
 /**
  * Outputs a hidden field
  *
  * @return string An <input type="hidden" />
  */
 public function render()
 {
     return HtmlInput::create('hidden', $this->name, Helpers::encode($this->value), $this->attributes)->render();
 }