ctf_aria_required : '';
if(!$si_contact_opt['ex_field'.$i.'_type'] ) $si_contact_opt['ex_field'.$i.'_type'] = 'text';
if(!$si_contact_opt['ex_field'.$i.'_default'] ) $si_contact_opt['ex_field'.$i.'_default'] = '0';
if(!isset($si_contact_opt['ex_field'.$i.'_default_text'] )) $si_contact_opt['ex_field'.$i.'_default_text'] = '';
if(!$si_contact_opt['ex_field'.$i.'_max_len'] ) $si_contact_opt['ex_field'.$i.'_max_len'] = '';
if(!$si_contact_opt['ex_field'.$i.'_label_css'] ) $si_contact_opt['ex_field'.$i.'_label_css'] = '';
if(!$si_contact_opt['ex_field'.$i.'_input_css'] ) $si_contact_opt['ex_field'.$i.'_input_css'] = '';
if(!$si_contact_opt['ex_field'.$i.'_attributes'] ) $si_contact_opt['ex_field'.$i.'_attributes'] = '';
if(!$si_contact_opt['ex_field'.$i.'_regex'] ) $si_contact_opt['ex_field'.$i.'_regex'] = '';
if(!$si_contact_opt['ex_field'.$i.'_regex_error'] ) $si_contact_opt['ex_field'.$i.'_regex_error'] = '';
if(!$si_contact_opt['ex_field'.$i.'_notes'] ) $si_contact_opt['ex_field'.$i.'_notes'] = '';
if(!$si_contact_opt['ex_field'.$i.'_notes_after'] ) $si_contact_opt['ex_field'.$i.'_notes_after'] = '';
switch ($si_contact_opt['ex_field'.$i.'_type']) {
case 'fieldset':
if($ex_fieldset)
$string .= "\n";
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_border_style;
$string .= '>
' . $si_contact_opt['ex_field'.$i.'_label'] ." \n";
$ex_fieldset = 1;
break;
case 'fieldset-close':
if($ex_fieldset)
$string .= " \n";
$ex_fieldset = 0;
break;
case 'hidden':
$exf_opts_label = ''; $value = '';
if(preg_match("/,/", $si_contact_opt['ex_field'.$i.'_label']) )
list($exf_opts_label, $value) = explode(",",$si_contact_opt['ex_field'.$i.'_label']);
$exf_opts_label = trim($exf_opts_label); $value = trim($value);
if ($exf_opts_label == '' || $value == '') {
// error
$this->si_contact_error = 1;
$string .= $this->ctf_echo_if_error(__('Error: A hidden field is not configured properly in settings.', 'si-contact-form'));
}
if (${'ex_field'.$i} != '') // guery string can overrride
$value = ${'ex_field'.$i};
$string .= '
';
break;
case 'password':
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
' . $si_contact_opt['ex_field'.$i.'_label'] . $ex_req_field_ind.'
ctf_field_div_style.'>'.$this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i}).'
ctf_field_style.' type="password" id="si_contact_ex_field'.$form_id_num.'_'.$i.'" name="si_contact_ex_field'.$i.'" value="' . $this->ctf_output_string(${'ex_field'.$i}) . '" '.$ex_req_field_aria.' ';
if($si_contact_opt['ex_field'.$i.'_max_len'] != '')
$string .= ' maxlength="'.$si_contact_opt['ex_field'.$i.'_max_len'].'" ';
if(strpos($si_contact_opt['ex_field'.$i.'_attributes'],'size')===false)
$string .= 'size="'.$ctf_field_size.'"';
if($si_contact_opt['ex_field'.$i.'_attributes'] != '')
$string .= ' '.$si_contact_opt['ex_field'.$i.'_attributes'];
$string .= ' />
';
if($si_contact_opt['ex_field'.$i.'_notes_after'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes_after']);
}
break;
case 'text':
case 'email':
case 'url':
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
' . $si_contact_opt['ex_field'.$i.'_label'] . $ex_req_field_ind.'
ctf_field_div_style.'>'.$this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i}).'
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_input_css']) : $this->ctf_field_style;
$string .= ' type="'.$si_contact_opt['ex_field'.$i.'_type'].'" id="si_contact_ex_field'.$form_id_num.'_'.$i.'" name="si_contact_ex_field'.$i.'" value="';
if($si_contact_opt['ex_field'.$i.'_default_text'] != '' && ${'ex_field'.$i} == '')
$string .= $this->ctf_output_string($si_contact_opt['ex_field'.$i.'_default_text']);
else
$string .= $this->ctf_output_string(${'ex_field'.$i});
$string .= '" '.$ex_req_field_aria.' ';
if($si_contact_opt['ex_field'.$i.'_max_len'] != '')
$string .= ' maxlength="'.$si_contact_opt['ex_field'.$i.'_max_len'].'" ';
if(strpos($si_contact_opt['ex_field'.$i.'_attributes'],'size')===false)
$string .= 'size="'.$ctf_field_size.'"';
if($si_contact_opt['ex_field'.$i.'_attributes'] != '')
$string .= ' '.$si_contact_opt['ex_field'.$i.'_attributes'];
$string .= ' />
';
if($si_contact_opt['ex_field'.$i.'_notes_after'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes_after']);
}
break;
case 'textarea':
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
' . $si_contact_opt['ex_field'.$i.'_label'] . $ex_req_field_ind.'
ctf_field_div_style.'>'.$this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i}).'
';
if($si_contact_opt['ex_field'.$i.'_notes_after'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes_after']);
}
break;
case 'select':
// find the label and the options inside $si_contact_opt['ex_field'.$i.'_label']
// the drop down list array will be made automatically by this code
$exf_opts_array = array();
$exf_opts_label = '';
$exf_array_test = trim($si_contact_opt['ex_field'.$i.'_label'] );
if(!preg_match('#(?si_contact_error = 1;
$string .= $this->ctf_echo_if_error(__('Error: A select field is not configured properly in settings.', 'si-contact-form'));
} else {
list($exf_opts_label, $value) = preg_split('#(?si_contact_error = 1;
$string .= $this->ctf_echo_if_error(__('Error: A select field is not configured properly in settings.', 'si-contact-form'));
} else {
// multiple options
$exf_opts_array = explode(";",$value);
}
}
} // end else
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
' . $exf_opts_label . $ex_req_field_ind.'
ctf_field_div_style.'>'.$this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i}).'
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_input_css']) : $this->ctf_field_style;
$string .= ' id="si_contact_ex_field'.$form_id_num.'_'.$i.'" name="si_contact_ex_field'.$i.'"';
if($si_contact_opt['ex_field'.$i.'_attributes'] != '')
$string .= ' '.$si_contact_opt['ex_field'.$i.'_attributes'];
$string .= '>
';
$exf_opts_ct = 1;
$selected = '';
foreach ($exf_opts_array as $k) {
$k = trim($k);
if (${'ex_field'.$i} != '') {
if (${'ex_field'.$i} == "$k") {
$selected = ' selected="selected"';
}
}else{
if ($exf_opts_ct == $si_contact_opt['ex_field'.$i.'_default']) {
$selected = ' selected="selected"';
}
}
if ($exf_opts_ct == 1 && preg_match('/^\[(.*)]$/',$k, $matches)) // "[Please select]" becomes "Please select"
$string .= ' '.$this->ctf_output_string($matches[1]).' '."\n";
else
$string .= ' '.$this->ctf_output_string($k).' '."\n";
$exf_opts_ct++;
$selected = '';
}
$string .= '
';
if($si_contact_opt['ex_field'.$i.'_notes_after'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes_after']);
}
break;
case 'select-multiple':
// find the label and the options inside $si_contact_opt['ex_field'.$i.'_label']
// the drop down list array will be made automatically by this code
$exf_opts_array = array();
$exf_opts_label = '';
$exf_array_test = trim($si_contact_opt['ex_field'.$i.'_label'] );
if(!preg_match('#(?si_contact_error = 1;
$string .= $this->ctf_echo_if_error(__('Error: A select-multiple field is not configured properly in settings.', 'si-contact-form'));
} else {
list($exf_opts_label, $value) = preg_split('#(?si_contact_error = 1;
$string .= $this->ctf_echo_if_error(__('Error: A select-multiple field is not configured properly in settings.', 'si-contact-form'));
} else {
// multiple options
$exf_opts_array = explode(";",$value);
}
}
} // end else
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
' . $exf_opts_label . $ex_req_field_ind.'
ctf_field_div_style.'>'.$this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i}).'
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_input_css']) : $this->ctf_field_style;
$string .= ' id="si_contact_ex_field'.$form_id_num.'_'.$i.'" name="si_contact_ex_field'.$i.'[]" multiple="multiple"';
if($si_contact_opt['ex_field'.$i.'_attributes'] != '')
$string .= ' '.$si_contact_opt['ex_field'.$i.'_attributes'];
$string .= '>
';
$ex_get = 0;
$ex_cnt = 1;
// any thing already selected by GET method?
foreach ($exf_opts_array as $k) {
if(isset(${'ex_field'.$i.'_'.$ex_cnt}) && ${'ex_field'.$i.'_'.$ex_cnt} == 'selected' ){
$ex_get =1;
break;
}
$ex_cnt++;
}
$exf_opts_ct = 1;
$selected = '';
foreach ($exf_opts_array as $k) {
$k = trim($k);
if (is_array(${'ex_field'.$i}) && ${'ex_field'.$i} != '') {
if (in_array($k, ${'ex_field'.$i} ) ) {
$selected = ' selected="selected"';
}
}
// selected by default
if (!isset($_POST['si_contact_form_id']) && !$ex_get && $exf_opts_ct == $si_contact_opt['ex_field'.$i.'_default']) {
$selected = ' selected="selected"';
}
// selected by get
if ( $ex_get && isset(${'ex_field'.$i.'_'.$exf_opts_ct}) && ${'ex_field'.$i.'_'.$exf_opts_ct} == 'selected' )
$selected = ' selected="selected"';
$string .= ' '.$this->ctf_output_string($k).' '."\n";
$exf_opts_ct++;
$selected = '';
}
$string .= '
';
if($si_contact_opt['ex_field'.$i.'_notes_after'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes_after']);
}
break;
case 'checkbox':
case 'checkbox-multiple':
$exf_opts_array = array();
$exf_opts_label = '';
$exf_opts_inline = 0;
$exf_array_test = trim($si_contact_opt['ex_field'.$i.'_label'] );
if ( ($si_contact_opt['ex_field'.$i.'_type'] == 'checkbox' && preg_match('#(?si_contact_error = 1;
$string .= $this->ctf_echo_if_error(__('Error: A checkbox field is not configured properly in settings.', 'si-contact-form'));
}
if( preg_match('#(?si_contact_error = 1;
$string .= $this->ctf_echo_if_error(__('Error: A checkbox field is not configured properly in settings.', 'si-contact-form'));
} else {
// multiple options
$exf_opts_array = explode(";",$value);
}
}
// checkbox children
if(preg_match('/^{inline}/',$exf_opts_label)) {
$exf_opts_label = str_replace('{inline}','',$exf_opts_label);
$exf_opts_inline = 1;
}
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
' . $exf_opts_label . $ex_req_field_ind.'
ctf_field_div_style.'>'. $this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i});
$string .= "\n";
$ex_get = 0;
$ex_cnt = 1;
// any thing already selected by GET method?
foreach ($exf_opts_array as $k) {
if(isset(${'ex_field'.$i.'_'.$ex_cnt}) && ${'ex_field'.$i.'_'.$ex_cnt} == 'selected' ){
$ex_get =1;
break;
}
$ex_cnt++;
}
$ex_cnt = 1;
foreach ($exf_opts_array as $k) {
$k = trim($k);
if(!$exf_opts_inline && $ex_cnt > 1)
$string .= " \n";
$string .= ' ' . $k .' ';
$ex_cnt++;
}
$string .= '
'."\n";
} else {
// single
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
ctf_field_div_style.'>'.$this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i}).'
' . $si_contact_opt['ex_field'.$i.'_label'] . $ex_req_field_ind.'
';
} // end else
if($si_contact_opt['ex_field'.$i.'_notes_after'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes_after']);
}
break;
case 'radio':
// find the label and the options inside $si_contact_opt['ex_field'.$i.'_label']
// the radio list array will be made automatically by this code
$exf_opts_array = array();
$exf_opts_label = '';
$exf_opts_inline = 0;
$exf_array_test = trim($si_contact_opt['ex_field'.$i.'_label'] );
if(!preg_match('#(?si_contact_error = 1;
$string .= $this->ctf_echo_if_error(__('Error: A radio field is not configured properly in settings.', 'si-contact-form'));
} else {
list($exf_opts_label, $value) = preg_split('#(?si_contact_error = 1;
$string .= $this->ctf_echo_if_error(__('Error: A radio field is not configured properly in settings.', 'si-contact-form'));
} else {
// multiple options
$exf_opts_array = explode(";",$value);
}
}
} // end else
if(preg_match('/^{inline}/',$exf_opts_label)) {
$exf_opts_label = str_replace('{inline}','',$exf_opts_label);
$exf_opts_inline = 1;
}
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
' . $exf_opts_label . $ex_req_field_ind.'
ctf_field_div_style.'>'. $this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i});
$string .= "\n";
$selected = '';
$ex_cnt = 1;
foreach ($exf_opts_array as $k) {
$k = trim($k);
if (${'ex_field'.$i} != '') {
if (${'ex_field'.$i} == "$k") {
$selected = ' checked="checked"';
}
}else{
if ($ex_cnt == $si_contact_opt['ex_field'.$i.'_default']) {
$selected = ' checked="checked"';
}
}
if(!$exf_opts_inline && $ex_cnt > 1)
$string .= " \n";
$string .= ' ' . $k .' '."\n";
$selected = '';
$ex_cnt++;
}
$string .= '
';
if($si_contact_opt['ex_field'.$i.'_notes_after'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes_after']);
}
break;
case 'attachment':
if ($si_contact_opt['php_mailer_enable'] != 'php') {
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
' . $si_contact_opt['ex_field'.$i.'_label'] . $ex_req_field_ind.'
ctf_field_div_style.'>'.$this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i}).'
ctf_field_style.' type="file" id="si_contact_ex_field'.$form_id_num.'_'.$i.'" name="si_contact_ex_field'.$i.'" value="' . $this->ctf_output_string(${'ex_field'.$i}) . '" '.$ex_req_field_aria.' size="20" ';
if($si_contact_opt['ex_field'.$i.'_attributes'] != '')
$string .= ' '.$si_contact_opt['ex_field'.$i.'_attributes'];
$string .= ' />';
if(!$printed_tooltip_filetypes || ($printed_tooltip_filetypes+1) != $ex_loop_cnt) {
$string .= '';
$string .= ($si_contact_opt['tooltip_filetypes'] != '') ? $si_contact_opt['tooltip_filetypes'] : __('Acceptable file types:', 'si-contact-form');
$string .= ' '.$si_contact_opt['attach_types'] . '. ';
$string .= ($si_contact_opt['tooltip_filesize'] != '') ? $si_contact_opt['tooltip_filesize'] : __('Maximum file size:', 'si-contact-form');
$string .= ' '.$si_contact_opt['attach_size'].'. ';
}
$printed_tooltip_filetypes = $ex_loop_cnt;
$string .= '
';
if($si_contact_opt['ex_field'.$i.'_notes_after'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes_after']);
}
}
break;
case 'date':
$cal_date_array = array(
'mm/dd/yyyy' => $this->ctf_output_string(__('mm/dd/yyyy', 'si-contact-form')),
'dd/mm/yyyy' => $this->ctf_output_string(__('dd/mm/yyyy', 'si-contact-form')),
'mm-dd-yyyy' => $this->ctf_output_string(__('mm-dd-yyyy', 'si-contact-form')),
'dd-mm-yyyy' => $this->ctf_output_string(__('dd-mm-yyyy', 'si-contact-form')),
'mm.dd.yyyy' => $this->ctf_output_string(__('mm.dd.yyyy', 'si-contact-form')),
'dd.mm.yyyy' => $this->ctf_output_string(__('dd.mm.yyyy', 'si-contact-form')),
'yyyy/mm/dd' => $this->ctf_output_string(__('yyyy/mm/dd', 'si-contact-form')),
'yyyy-mm-dd' => $this->ctf_output_string(__('yyyy-mm-dd', 'si-contact-form')),
'yyyy.mm.dd' => $this->ctf_output_string(__('yyyy.mm.dd', 'si-contact-form')),
);
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
' .$si_contact_opt['ex_field'.$i.'_label'] . $ex_req_field_ind.'
ctf_field_div_style.'>'.$this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i}).'
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_input_css']) : $this->ctf_field_style;
$string .= ' type="text" id="si_contact_ex_field'.$form_id_num.'_'.$i.'" name="si_contact_ex_field'.$i.'" value="';
$string .= ( isset(${'ex_field'.$i}) && ${'ex_field'.$i} != '') ? $this->ctf_output_string(${'ex_field'.$i}): $cal_date_array[$si_contact_opt['date_format']];
$string .= '" '.$ex_req_field_aria.' size="15" ';
if($si_contact_opt['ex_field'.$i.'_attributes'] != '')
$string .= ' '.$si_contact_opt['ex_field'.$i.'_attributes'];
$string .= ' />
';
if($si_contact_opt['ex_field'.$i.'_notes_after'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes_after']);
}
break;
case 'time':
// the time drop down list array will be made automatically by this code
$exf_opts_array = array();
if($si_contact_opt['ex_field'.$i.'_notes'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes']);
}
$string .= '
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_label_css']) : $this->ctf_title_style;
$string .= '>
' . $si_contact_opt['ex_field'.$i.'_label'] . $ex_req_field_ind.'
ctf_field_div_style.'>'.$this->ctf_echo_if_error(${'si_contact_error_ex_field'.$i}).'
si_contact_convert_css($si_contact_opt['ex_field'.$i.'_input_css']) : $this->ctf_field_style;
$string .= ' id="si_contact_ex_field'.$form_id_num.'_'.$i.'" name="si_contact_ex_field'.$i.'h">
';
$selected = '';
// hours
$tf_hours = ($si_contact_opt['time_format'] == '24') ? '23' : '12';
for ($ii = ($si_contact_opt['time_format'] == '24') ? 0 : 1; $ii <= $tf_hours; $ii++) {
$ii = sprintf("%02d",$ii);
if (${'ex_field'.$i.'h'} != '') {
if (${'ex_field'.$i.'h'} == "$ii") {
$selected = ' selected="selected"';
}
}
$string .= ' '.$this->ctf_output_string($ii).' '."\n";
$selected = '';
}
$string .= ' :si_contact_convert_css($si_contact_opt['ex_field'.$i.'_input_css']) : $this->ctf_field_style;
$string .= ' id="si_contact_ex_field'.$form_id_num.'_'.$i.'m" name="si_contact_ex_field'.$i.'m">
';
$selected = '';
// minutes
for ($ii = 00; $ii <= 59; $ii++) {
$ii = sprintf("%02d",$ii);
if (${'ex_field'.$i.'m'} != '') {
if (${'ex_field'.$i.'m'} == "$ii") {
$selected = ' selected="selected"';
}
}
$string .= ' '.$this->ctf_output_string($ii).' '."\n";
$selected = '';
}
$string .= ' ';
if ($si_contact_opt['time_format'] == '12'){
$string .= 'si_contact_convert_css($si_contact_opt['ex_field'.$i.'_input_css']) : $this->ctf_field_style;
$string .= ' id="si_contact_ex_field'.$form_id_num.'_'.$i.'ap" name="si_contact_ex_field'.$i.'ap">
';
$selected = '';
// am/pm
foreach (array($this->ctf_output_string(__('AM', 'si-contact-form')), $this->ctf_output_string(__('PM', 'si-contact-form')) ) as $k) {
if (${'ex_field'.$i.'ap'} != '') {
if (${'ex_field'.$i.'ap'} == "$k") {
$selected = ' selected="selected"';
}
}
$string .= ' '.$this->ctf_output_string($k).' '."\n";
$selected = '';
}
$string .= ' ';
}
$string .= '
';
if($si_contact_opt['ex_field'.$i.'_notes_after'] != '') {
$string .= $this->ctf_notes($si_contact_opt['ex_field'.$i.'_notes_after']);
}
break;
}
} // end if label
$ex_loop_cnt++;
} // end foreach
// how many extra fields are date fields?
$ex_date_found = array();
for ($i = 1; $i <= $si_contact_opt['max_fields']; $i++) {
if ($si_contact_opt['ex_field'.$i.'_label'] != '' && $si_contact_opt['ex_field'.$i.'_type'] == 'date') {
$ex_date_found[$i] = $i;
}
}
if (isset($ex_date_found) && count($ex_date_found) > 0 ) {
$string .=
/*' */
'
\n";
}
if($ex_fieldset)
$string .= "\n";
?>