Disable submit on preview

[MAILPOET-2602]
This commit is contained in:
Pavel Dohnal
2020-02-11 14:52:19 +01:00
committed by Jack Kitterhing
parent 8885003b41
commit 8bdb64a97b

View File

@ -109,6 +109,7 @@ class Forms extends APIEndpoint {
public function previewEditor($data = []) {
// html
$html = $this->formRenderer->renderHTML($data);
$html = str_replace('type="submit"', 'type="submit" disabled', $html);
// convert shortcodes
$html = WPFunctions::get()->doShortcode($html);