@@ -24,12 +24,16 @@ public function render( $field_settings, $form_id ) {
2424 // let's not show the name field if user choose to auto populate for logged users
2525 if ( isset ( $ field_settings ['auto_populate ' ] ) && $ field_settings ['auto_populate ' ] == 'yes ' && is_user_logged_in () ) {
2626 return ;
27- } ?>
27+ }
28+ $ form_settings = weforms ()->form ->get ( $ form_id )->get_settings ();
29+
30+ $ use_theme_css = isset ( $ form_settings ['use_theme_css ' ] ) ? $ form_settings ['use_theme_css ' ] : 'wpuf-style ' ;
31+ ?>
2832 <li <?php $ this ->print_list_attributes ( $ field_settings ); ?> >
2933 <?php $ this ->print_label ( $ field_settings , $ form_id ); ?>
3034
3135 <div class="wpuf-fields">
32- <div class="wpuf-name-field-wrap format-<?php echo esc_attr ( $ field_settings ['format ' ] ); ?> ">
36+ <div class="wpuf-name-field-wrap format-<?php echo esc_attr ( $ field_settings ['format ' ] ); ?> " data-style=" <?php echo esc_attr ( $ use_theme_css ); ?> " >
3337 <div class="wpuf-name-field-first-name">
3438 <input
3539 name="<?php echo esc_attr ( $ field_settings ['name ' ] ) ?> [first]"
@@ -39,11 +43,12 @@ public function render( $field_settings, $form_id ) {
3943 size="40"
4044 data-required="<?php echo esc_attr ( $ field_settings ['required ' ] ) ?> "
4145 data-type="text"
46+ data-style="<?php echo esc_attr ( $ use_theme_css ); ?> "
4247 class="textfield wpuf_<?php echo esc_attr ( $ field_settings ['name ' ] ); ?> _<?php echo esc_attr ( $ form_id ); ?> "
4348 autocomplete="given-name"
4449 >
4550 <?php if ( ! $ field_settings ['hide_subs ' ] ) : ?>
46- <label class="wpuf-form-sub-label"><?php esc_html_e ( 'First ' , 'weforms ' ); ?> </label>
51+ <label class="wpuf-form-sub-label" data-style=" <?php echo esc_attr ( $ use_theme_css ); ?> " ><?php esc_html_e ( 'First ' , 'weforms ' ); ?> </label>
4752 <?php endif ; ?>
4853 </div>
4954
@@ -56,9 +61,10 @@ class="textfield wpuf_<?php echo esc_attr( $field_settings['name'] ); ?>_<?php e
5661 value="<?php echo esc_attr ( $ field_settings ['middle_name ' ]['default ' ] ); ?> "
5762 size="40"
5863 autocomplete="additional-name"
64+ data-style="<?php echo esc_attr ( $ use_theme_css ); ?> "
5965 >
6066 <?php if ( ! $ field_settings ['hide_subs ' ] ) : ?>
61- <label class="wpuf-form-sub-label"><?php esc_html_e ( 'Middle ' , 'weforms ' ); ?> </label>
67+ <label class="wpuf-form-sub-label" data-style=" <?php echo esc_attr ( $ use_theme_css ); ?> " ><?php esc_html_e ( 'Middle ' , 'weforms ' ); ?> </label>
6268 <?php endif ; ?>
6369 </div>
6470 <?php } else { ?>
@@ -73,9 +79,10 @@ class="textfield wpuf_<?php echo esc_attr( $field_settings['name'] ); ?>_<?php e
7379 value="<?php echo esc_attr ( $ field_settings ['last_name ' ]['default ' ] ); ?> "
7480 size="40"
7581 autocomplete="family-name"
82+ data-style="<?php echo esc_attr ( $ use_theme_css ); ?> "
7683 >
7784 <?php if ( ! $ field_settings ['hide_subs ' ] ) : ?>
78- <label class="wpuf-form-sub-label"><?php esc_html_e ( 'Last ' , 'weforms ' ); ?> </label>
85+ <label class="wpuf-form-sub-label" data-style=" <?php echo esc_attr ( $ use_theme_css ); ?> " ><?php esc_html_e ( 'Last ' , 'weforms ' ); ?> </label>
7986 <?php endif ; ?>
8087 </div>
8188 </div>
0 commit comments