Example #1
0
 /**
  * Get the Form Field Label
  *
  * @return string
  */
 public function getLabel()
 {
     $open_html = "<div class=\"control-label\"><span class=\"span-label\">";
     $close_html = '</span></div>';
     $html = '';
     $label = $this->currentField->getLabelOption();
     if ($label) {
         $label = $this->currentField->getSetting('label');
         $html = "{$open_html}{$label} {$close_html}";
     }
     return $html;
 }
Example #2
0
 /**
  * Get base field value
  *
  * Some fields need to be saved as serialized arrays. Getting
  * the field by the base value is used by Fields to populate
  * their values.
  *
  * @param $field_name
  *
  * @return null
  */
 protected function getBaseFieldValue($field_name)
 {
     $data = $this->field->getForm()->getModel()->{$field_name};
     return $this->getValueOrNull($data);
 }