public function submit($caption = null, array $options = []) {

        if ( ! preg_match('/\.(jpg|jpe|jpeg|gif|png|ico)$/', $caption)) {
            $options = $this->parseButtonClass($options);
        }

        if ( ! empty($this->getConfig('layout.classes.submitContainer'))) {
            $this->_setTemplatesInternal([
                'submitContainer' => '<div{{attrs}}>{{content}}</div>',
            ]);

            // Add the attributes for the submitContainer
            $options['templateVars']['attrs'] = $this->templater()->formatAttributes([
                'class' => $this->getConfig('layout.classes.submitContainer'),
            ]);
        }

        $options = $this->cleanArray($options);

        return parent::submit($caption, $options);
    }