I made some changes in the cforms-global-settings.php and the lib_functions.php to:
– Enable month selection drop down in global settings
– Set the datepickers year range in the global settings
– Set the year which is shown first when the datepicher pops up
I think it would be great to add these changes to the next cforms version!
Here are the changes:
in the lib_functions.php:
added this lines after line 171:
'changeMonth' => $nav[7]==1,
'yearRange' => stripslashes($nav[8]),
'defaultDate' => stripslashes($nav[9]),
in the cforms-global-settings.php:
added this lines after line 89:
$nav[7]=cforms2_get_boolean_from_request('cforms_dp_Mbuttons');
$nav[8]=cforms2_get_from_request('cforms_dp_yearrange');
$nav[9]=cforms2_get_from_request('cforms_dp_popupyear');
and this code after line 255:
<tr class="ob">
<?php $nav = $cformsSettings['global']['cforms_dp_nav']; ?>
<td class="obL"></td>
<td class="obR"><input class="allchk" type="checkbox" id="cforms_dp_Mbuttons" name="cforms_dp_Mbuttons" <?php if($nav[7]=="1") echo "checked=\"checked\""; ?>/><label for="cforms_dp_Mbuttons"><strong><?php _e('Enable month selection drop down', 'cforms2') ?></strong></label></td>
</tr>
<tr class="ob">
<td class="obL"><label for="cforms_dp_yearrange"><strong><?php _e('Yearrange', 'cforms2'); ?></strong></label></td>
<td class="obR"><input type="text" id="cforms_dp_yearrange" name="cforms_dp_yearrange" value="<?php echo stripslashes(htmlspecialchars( $nav[8] )); ?>"/></td>
</tr>
<tr class="ob">
<td class="obL"><label for="cforms_dp_popupyear"><strong><?php _e('PopUpYear', 'cforms2'); ?></strong></label></td>
<td class="obR"><input type="text" id="cforms_dp_popupyear" name="cforms_dp_popupyear" value="<?php echo stripslashes(htmlspecialchars( $nav[9] )); ?>"/></td>
</tr>