New Question type. Just a Month-Year type with a month drop down and a 4 digit year text box.
This commit is contained in:
parent
2151730767
commit
cafd31f87a
4 changed files with 48 additions and 2 deletions
|
|
@ -1219,8 +1219,10 @@ sub prepareShowSurveyTemplate {
|
|||
my %text = ( 'Text', 1, 'Email', 1, 'Phone Number', 1, 'Text Date', 1, 'Currency', 1 );
|
||||
my %slider = ( 'Slider', 1, 'Dual Slider - Range', 1, 'Multi Slider - Allocate', 1 );
|
||||
my %dateType = ( 'Date', 1, 'Date Range', 1 );
|
||||
my %dateShort = ( 'Year Month', 1 );
|
||||
my %fileUpload = ( 'File Upload', 1 );
|
||||
my %hidden = ( 'Hidden', 1 );
|
||||
use Data::Dumper;
|
||||
|
||||
foreach my $q (@$questions) {
|
||||
if ( $fileUpload{ $q->{questionType} } ) { $q->{fileLoader} = 1; }
|
||||
|
|
@ -1236,6 +1238,26 @@ sub prepareShowSurveyTemplate {
|
|||
elsif ( $dateType{ $q->{questionType} } ) {
|
||||
$q->{dateType} = 1;
|
||||
}
|
||||
elsif ( $dateShort{ $q->{questionType} } ) {
|
||||
$q->{dateShort} = 1;
|
||||
foreach my $a(@{$q->{answers}}){
|
||||
$a->{months} = [
|
||||
{'month' => ''},
|
||||
{'month' => 'January'},
|
||||
{'month' => 'February'},
|
||||
{'month' => 'March'},
|
||||
{'month' => 'April'},
|
||||
{'month' => 'May'},
|
||||
{'month' => 'June'},
|
||||
{'month' => 'July'},
|
||||
{'month' => 'August'},
|
||||
{'month' => 'September'},
|
||||
{'month' => 'October'},
|
||||
{'month' => 'November'},
|
||||
{'month' => 'December'}
|
||||
];
|
||||
}
|
||||
}
|
||||
elsif ( $slider{ $q->{questionType} } ) {
|
||||
$q->{slider} = 1;
|
||||
if ( $q->{questionType} eq 'Dual Slider - Range' ) {
|
||||
|
|
|
|||
|
|
@ -115,6 +115,7 @@ my @SPECIAL_QUESTION_TYPES = (
|
|||
'File Upload',
|
||||
'Date',
|
||||
'Date Range',
|
||||
'Year Month',
|
||||
'Hidden',
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue