File tree Expand file tree Collapse file tree 1 file changed +13
-1
lines changed
Expand file tree Collapse file tree 1 file changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ public function render( $field_settings, $form_id ) {
2525 <?php $ this ->print_label ( $ field_settings ); ?>
2626
2727 <div class="wpuf-fields">
28- <input id="wpuf-date-<?php echo esc_attr ( $ field_settings ['name ' ] ); ?> " type="text" class="datepicker <?php echo ' wpuf_ ' .esc_attr ( $ field_settings ['name ' ] ).'_ ' . esc_attr ($ form_id ); ?> " data-required="<?php echo esc_attr ($ field_settings ['required ' ]) ?> " data-type="text" name="<?php echo esc_attr ( $ field_settings ['name ' ] ); ?> " placeholder="<?php echo esc_attr ( $ field_settings ['format ' ] ); ?> " value="<?php echo esc_attr ( $ value ) ?> " size="30" />
28+ <input id="wpuf-date-<?php echo esc_attr ( $ field_settings ['name ' ] ); ?> " type="text" <?php echo esc_attr ( $ field_settings [ ' enforce_format ' ] !== ' yes ' ) ? '' : ' readonly ' ; ?> class="datepicker <?php echo ' wpuf_ ' .esc_attr ( $ field_settings ['name ' ] ).'_ ' . esc_attr ($ form_id ); ?> " data-required="<?php echo esc_attr ($ field_settings ['required ' ]) ?> " data-type="text" name="<?php echo esc_attr ( $ field_settings ['name ' ] ); ?> " placeholder="<?php echo esc_attr ( $ field_settings ['format ' ] ); ?> " value="<?php echo esc_attr ( $ value ) ?> " size="30" />
2929 <?php $ this ->help_text ( $ field_settings ); ?>
3030 </div>
3131 </li>
@@ -88,6 +88,18 @@ public function get_options_settings() {
8888 'priority ' => 24 ,
8989 'help_text ' => '' ,
9090 ],
91+ [
92+ 'name ' => 'enforce_format ' ,
93+ 'title ' => '' ,
94+ 'type ' => 'checkbox ' ,
95+ 'section ' => 'advanced ' ,
96+ 'is_single_opt ' => true ,
97+ 'options ' => [
98+ 'yes ' => __ ( 'Enforce Date Format ' , 'weforms ' ),
99+ ],
100+ 'priority ' => 24 ,
101+ 'help_text ' => __ ( 'Disables Keyboard Input and uses the Datepicker Format ' , 'weforms ' ),
102+ ]
91103 ];
92104
93105 return array_merge ( $ default_options , $ settings );
You can’t perform that action at this time.
0 commit comments