Jump to content

Recommended Posts

Posted

Helpers - Form - function CustomTemplate() (part)

		foreach ( $this->elements as $tab => $elements )
		{
			$html[ $tab ] = '';
			foreach ( $elements as $k => $element )
			{
				if ( $element instanceof Form\Matrix )
				{
					$html[ $tab ] .= \IPS\Theme::i()->getTemplate( 'forms', 'core' )->emptyRow( $element->nested(), $k );
					continue;
				}
				if ( !\is_string( $element ) and $element->error ) { $errorTabs[] = $tab; }
				$html[ $tab ] .= ( $element instanceof \IPS\Helpers\Form\FormAbstract ) ? $element->rowHtml( $this ) : (string) $element;
			}
        }

		$templateArguments = array_merge( $args, array( $this->id, $this->action, $this->elements, $this->hiddenValues, $this->actionButtons, 
			$this->uploadField, $this->class, $this->attributes, $this->sidebar, $this, $errorTabs ) );
		return $template( ...$templateArguments );
	}

Variable $html don't use later.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...