Example #1
0
 /**
  * return the form view
  * @return mixed
  */
 public function present()
 {
     $date = null;
     if (!empty($this->value)) {
         $date = Carbon::createFromTimestamp(strtotime($this->value));
     }
     return Field::text($this->fieldSlug, empty($date) ? null : $date->format('m/d/Y'), ['label' => $this->fieldName, 'class' => 'datepicker']);
 }
 /**
  * return the form view
  * @return mixed
  */
 public function present()
 {
     $options = [];
     foreach (unserialize($this->fieldOptions) as $o) {
         $options[$o] = $o;
     }
     return Field::select($this->fieldSlug, $options, $this->value, ['label' => $this->fieldName, 'class' => 'select2']);
 }
Example #3
0
 /**
  * return the form view
  * @return mixed
  */
 public function present()
 {
     return Field::text($this->fieldSlug, $this->value, ['label' => $this->fieldName]);
 }