public static function get_draft_button($form, $class = '', $html = false) { if (!$html) { $html = '[if save_draft]<input type="submit" value="[draft_label]" name="frm_save_draft" formnovalidate="formnovalidate" class="frm_save_draft ' . $class . '" [draft_hook] />[/if save_draft]'; } $html = FrmProFormsController::replace_shortcodes($html, $form); if (strpos($html, '[if save_draft]') !== false) { $html = preg_replace('/(\\[if\\s+save_draft\\])(.*?)(\\[\\/if\\s+save_draft\\])/mis', '', $html); } return $html; }