| @@ -23,14 +23,18 @@ | ||
| 23 | 23 | |
| 24 | 24 | // let's not show the name field if user choose to auto populate for logged users |
| 25 | 25 | if ( isset( $field_settings['auto_populate'] ) && $field_settings['auto_populate'] == 'yes' && is_user_logged_in() ) { |
| 26 | 26 | 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 | + ?> | |
| 28 | 32 | <li <?php $this->print_list_attributes( $field_settings ); ?>> |
| 29 | 33 | <?php $this->print_label( $field_settings, $form_id ); ?> |
| 30 | 34 | |
| 31 | 35 | <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 ); ?>"> | |
| 33 | 37 | <div class="wpuf-name-field-first-name"> |
| 34 | 38 | <input |
| 35 | 39 | name="<?php echo esc_attr( $field_settings['name'] ) ?>[first]" |
| 36 | 40 | type="text" |
| @@ -38,13 +42,14 @@ | ||
| 38 | 42 | value="<?php echo esc_attr( $field_settings['first_name']['default'] ); ?>" |
| 39 | 43 | size="40" |
| 40 | 44 | data-required="<?php echo esc_attr( $field_settings['required'] ) ?>" |
| 41 | 45 | data-type="text" |
| 46 | + data-style="<?php echo esc_attr( $use_theme_css ); ?>" | |
| 42 | 47 | class="textfield wpuf_<?php echo esc_attr( $field_settings['name'] ); ?>_<?php echo esc_attr( $form_id); ?>" |
| 43 | 48 | autocomplete="given-name" |
| 44 | 49 | > |
| 45 | 50 | <?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> | |
| 47 | 52 | <?php endif; ?> |
| 48 | 53 | </div> |
| 49 | 54 | |
| 50 | 55 | <?php if ( $field_settings['format'] != 'first-last' ) { ?> |
| @@ -55,11 +60,12 @@ | ||
| 55 | 60 | placeholder="<?php echo esc_attr( $field_settings['middle_name']['placeholder'] ); ?>" |
| 56 | 61 | value="<?php echo esc_attr( $field_settings['middle_name']['default'] ); ?>" |
| 57 | 62 | size="40" |
| 58 | 63 | autocomplete="additional-name" |
| 64 | + data-style="<?php echo esc_attr( $use_theme_css ); ?>" | |
| 59 | 65 | > |
| 60 | 66 | <?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> | |
| 62 | 68 | <?php endif; ?> |
| 63 | 69 | </div> |
| 64 | 70 | <?php } else { ?> |
| 65 | 71 | <input type="hidden" name="<?php echo esc_attr( $field_settings['name'] ) ?>[middle]" value=""> |
| @@ -72,11 +78,12 @@ | ||
| 72 | 78 | placeholder="<?php echo esc_attr( $field_settings['last_name']['placeholder'] ); ?>" |
| 73 | 79 | value="<?php echo esc_attr( $field_settings['last_name']['default'] ); ?>" |
| 74 | 80 | size="40" |
| 75 | 81 | autocomplete="family-name" |
| 82 | + data-style="<?php echo esc_attr( $use_theme_css ); ?>" | |
| 76 | 83 | > |
| 77 | 84 | <?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> | |
| 79 | 86 | <?php endif; ?> |
| 80 | 87 | </div> |
| 81 | 88 | </div> |
| 82 | 89 | <?php $this->help_text( $field_settings ); ?> |