tag for the form field object. * @param mixed $value The form field value to validate. * @param string $group The field name group control value. This acts as as an array container for the field. * For example if the field has name="foo" and the group value is set to "bar" then the * full field name would end up being "bar[foo]". * * @return boolean True on success. * * @since 2.8 */ public function setup(SimpleXMLElement $element, $value, $group = null) { $return = parent::setup($element, $value, $group); return $return; } /** * Method to get the field input markup. * * @return string The field input markup. * * @since 11.1 */ protected function getInput() { $values = $this->value; if (is_string($values) && !empty($values)) { $value = htmlspecialchars_decode($this->value); $values = json_decode($value, true); if (empty($values) && strpos($value, ':') !== false && strpos($value, '{') === false) { $values = array(); foreach (explode(',', $value) as $item) { $pair = explode(':', $item); array_walk($pair, function (&$val) { $val = trim($val, chr(0x22) . chr(0x27) . chr(0x38)); }); $values[] = array( 'name' => $pair[0], 'value' => $pair[1] ); } } } // default if (empty($values)) { $values = array( array( 'name' => '', 'value' => '', ), ); } $subForm = new JForm($this->name, array('control' => $this->formControl)); $children = $this->element->children(); $subForm->load($children); $subForm->setFields($children); $fields = $subForm->getFieldset(); // And finaly build a main container $str = array(); foreach ($values as $value) { $str[] = '