diff --git a/assets/js/src/form_editor/store/form_body_to_blocks.jsx b/assets/js/src/form_editor/store/form_body_to_blocks.jsx index cc87874571..e5e2ba1434 100644 --- a/assets/js/src/form_editor/store/form_body_to_blocks.jsx +++ b/assets/js/src/form_editor/store/form_body_to_blocks.jsx @@ -30,7 +30,7 @@ const mapBlockStyles = (styles) => { return backwardCompatibleBlockStyles; } const mappedStyles = { - fullWidth: styles.full_width === '1', + fullWidth: styles.full_width === '1' || styles.full_width === true, }; // Detect if styles inherit from theme by checking if bold param is present if (!has(styles, 'bold')) { @@ -38,7 +38,7 @@ const mapBlockStyles = (styles) => { return mappedStyles; } mappedStyles.inheritFromTheme = false; - mappedStyles.bold = styles.bold === '1'; + mappedStyles.bold = styles.bold === '1' || styles.bold === true; if (has(styles, 'background_color') && styles.background_color) { mappedStyles.backgroundColor = styles.background_color; } diff --git a/lib/Form/FormFactory.php b/lib/Form/FormFactory.php index 3897fbd4e5..bed3080b11 100644 --- a/lib/Form/FormFactory.php +++ b/lib/Form/FormFactory.php @@ -19,6 +19,9 @@ class FormFactory { 'required' => true, 'label_within' => true, ], + 'styles' => [ + 'full_width' => true, + ], ], [ 'id' => 'submit', @@ -27,6 +30,9 @@ class FormFactory { 'params' => [ 'label' => __('Subscribe!', 'mailpoet'), ], + 'styles' => [ + 'full_width' => true, + ], ], ], 'settings' => [