Ejemplo n.º 1
0
$form->bind($data);
$scripts = array();
$toggle = array();
if ($this->fields->count() > 0) {
    ?>
			<fieldset>
				<legend><?php 
    echo Lang::txt('COM_MEMBERS_REGISTER_LEGEND_PERSONAL_INFO');
    ?>
</legend>

				<?php 
    foreach ($this->fields as $field) {
        ?>
					<?php 
        $formfield = $form->getField($field->get('name'));
        if ($field->options->count()) {
            $i = 0;
            $hasEvents = false;
            $opts = array();
            $hide = array();
            foreach ($field->options as $option) {
                $opts[] = '#' . $formfield->id . $i;
                $i++;
                if (!$option->get('dependents')) {
                    continue;
                }
                $events = json_decode($option->get('dependents'));
                $option->set('dependents', $events);
                if (empty($events)) {
                    continue;