| @@ -32,13 +32,17 @@ | ||
| 32 | 32 | $required = ''; |
| 33 | 33 | if(isset($field->is_required) && $field->is_required == 1) |
| 34 | 34 | $required = '*'; |
| 35 | 35 | |
| 36 | +if(isset($field->rules) && strpos($field->rules, 'required') !== FALSE) | |
| 37 | + $required = '*'; | |
| 38 | + | |
| 36 | 39 | ?> |
| 37 | -<div class="wdk-field-edit <?php echo esc_attr($field->field_type); ?> wdk-col-<?php echo esc_attr($field->columns_number); ?> <?php echo esc_attr($field->class); ?>"> | |
| 40 | +<div class="wdk-field-<?php echo esc_attr($field_id);?> wdk-field-edit <?php echo esc_attr($field->field_type); ?> wdk-col-<?php echo esc_attr($field->columns_number); ?> <?php echo esc_attr($field->class); ?>"> | |
| 38 | 41 | <label for="<?php echo esc_attr($field_id); ?>"><?php echo esc_html($field_label).esc_html($required); ?></label> |
| 39 | 42 | <div class="wdk-field-container"> |
| 40 | - <input class="regular-text wdk-fielddate_from" <?php if(false):?>date-format="<?php echo esc_attr(wdk_jsdateformat(get_option('date_format')));?>"<?php endif;?> name="<?php echo esc_attr($field_id); ?>" type="text" id="<?php echo esc_attr($field_id); ?>" value="<?php echo esc_attr(wmvc_show_data($field_id, $db_data, '')); ?>"> | |
| 43 | + <input class="regular-text db-date" <?php if(false):?>date-format="<?php echo esc_attr(wdk_jsdateformat(get_option('date_format')));?>"<?php endif;?> name="<?php echo esc_attr($field_id); ?>" type="hidden" id="<?php echo esc_attr($field_id); ?>" value="<?php echo esc_attr(wmvc_show_data($field_id, $db_data, '')); ?>"> | |
| 44 | + <input class="regular-text wdk-fielddate_from" <?php if(false):?>date-format="<?php echo esc_attr(wdk_jsdateformat(get_option('date_format')));?>"<?php endif;?> name="<?php echo esc_attr($field_id); ?>_mask" type="text" id="<?php echo esc_attr($field_id); ?>_mask" value="<?php echo esc_attr(wdk_get_date(wmvc_show_data($field_id, $db_data, ''),false)); ?>"> | |
| 41 | 45 | <?php if(!empty($field->hint)):?> |
| 42 | 46 | <p class="wdk-hint"> |
| 43 | 47 | <?php echo esc_html($field->hint); ?> |
| 44 | 48 | </p> |