desti Posted October 19, 2020 Posted October 19, 2020 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.
desti Posted October 19, 2020 Author Posted October 19, 2020 Yep... copy-paste from function __toString() :)
Recommended Posts