diff --git a/shortcodes/oik-contact-form.php b/shortcodes/oik-contact-form.php index c576540..d5c96a2 100644 --- a/shortcodes/oik-contact-form.php +++ b/shortcodes/oik-contact-form.php @@ -83,7 +83,7 @@ function _bw_show_contact_form_oik( $atts, $user=null, $content=null ) { sdiv( $class ); bw_form(); if ( function_exists( 'bw_is_table')) { - bw_table_or_grid_start( false ); // Start a grid + bw_table_or_grid_start( empty($content) ); // Start a grid if fields are defined } else { stag( 'table' ); } diff --git a/src/oik-contact-form/index.js b/src/oik-contact-form/index.js index dfe9c2d..f94bd74 100644 --- a/src/oik-contact-form/index.js +++ b/src/oik-contact-form/index.js @@ -46,9 +46,10 @@ registerBlockType( } ), } ); - const innerBlocksTemplate = [ ['oik/contact-field', { label: 'Name', type: 'text', 'required': true }], - ['oik/contact-field', { label: 'Email', type: 'email', 'required': true }], - ['oik/contact-field', { label: 'Message', type:'textarea', 'required': true }] + const innerBlocksTemplate = [ ['oik/contact-field', { label: 'Name', type: 'text', 'required': true, 'requiredIndicator': ' *' }], + ['oik/contact-field', { label: 'Email', type: 'email', 'required': true, 'requiredIndicator': ' *' }], + ['oik/contact-field', { label: 'Subject', type: 'text', 'required': false }], + ['oik/contact-field', { label: 'Message', type:'textarea', 'required': true, 'requiredIndicator': ' *' }] ]; const onChangeContact = (event) => { props.setAttributes({contact: event}); diff --git a/tests/data/bb_BB/test_bw_contact_form_bb_BB.html b/tests/data/bb_BB/test_bw_contact_form_bb_BB.html index 6e4537e..325baea 100644 --- a/tests/data/bb_BB/test_bw_contact_form_bb_BB.html +++ b/tests/data/bb_BB/test_bw_contact_form_bb_BB.html @@ -1,32 +1,40 @@