60 |
60 |
function make_checkbox(&$n, $idx, $params) {
|
61 |
61 |
$field_id = $params[0][0];
|
62 |
62 |
$seperator = $params[0][1];
|
63 |
|
$label_id = 'wb_'.str_replace(" ", "_", $n);
|
|
63 |
$label_id = 'wb_'.preg_replace('/[^a-z0-1]/i', '_', $n);
|
64 |
64 |
if(in_array($n, $params[1])) {
|
65 |
65 |
$n = '<input class="field_checkbox" type="checkbox" id="'.$label_id.'" name="field'.$field_id.'['.$idx.']" value="'.$n.'" checked="checked" />'.'<label for="'.$label_id.'" class="checkbox_label">'.$n.'</lable>'.$seperator;
|
66 |
66 |
} else {
|
... | ... | |
74 |
74 |
$field_id = $params[0];
|
75 |
75 |
$group = $params[1];
|
76 |
76 |
$seperator = $params[2];
|
77 |
|
$label_id = 'wb_'.str_replace(" ", "_", $n);
|
|
77 |
$label_id = 'wb_'.preg_replace('/[^a-z0-1]/i', '_', $n);
|
78 |
78 |
if($n == $params[3]) {
|
79 |
79 |
$n = '<input class="field_radio" type="radio" id="'.$label_id.'" name="field'.$field_id.'" value="'.$n.'" checked="checked" />'.'<label for="'.$label_id.'" class="radio_label">'.$n.'</label>'.$seperator;
|
80 |
80 |
} else {
|
... | ... | |
178 |
178 |
}
|
179 |
179 |
if($field['type'] == 'textfield') {
|
180 |
180 |
$vars[] = '{FIELD}';
|
181 |
|
$values[] = '<input type="text" name="field'.$field_id.'" id="field'.$field_id.'" maxlength="'.$field['extra'].'" value="'.(isset($_SESSION['field'.$field_id])?$_SESSION['field'.$field_id]:$value).'" class="textfield" />';
|
|
181 |
$max_lenght_para = (intval($field['extra']) ? ' maxlenght="'.intval($field['extra']).'"' : '');
|
|
182 |
$values[] = '<input type="text" name="field'.$field_id.'" id="field'.$field_id.'"'.$max_lenght_para.' value="'.(isset($_SESSION['field'.$field_id])?$_SESSION['field'.$field_id]:$value).'" class="textfield" />';
|
182 |
183 |
} elseif($field['type'] == 'textarea') {
|
183 |
184 |
$vars[] = '{FIELD}';
|
184 |
185 |
$values[] = '<textarea name="field'.$field_id.'" id="field'.$field_id.'" class="textarea" cols="25" rows="5">'.(isset($_SESSION['field'.$field_id])?$_SESSION['field'.$field_id]:$value).'</textarea>';
|
... | ... | |
208 |
209 |
$values[] = implode($options);
|
209 |
210 |
} elseif($field['type'] == 'email') {
|
210 |
211 |
$vars[] = '{FIELD}';
|
211 |
|
$values[] = '<input type="text" name="field'.$field_id.'" id="field'.$field_id.'" value="'.(isset($_SESSION['field'.$field_id])?$_SESSION['field'.$field_id]:'').'" maxlength="'.$field['extra'].'" class="email" />';
|
|
212 |
$max_lenght_para = (intval($field['extra']) ? ' maxlenght="'.intval($field['extra']).'"' : '');
|
|
213 |
$values[] = '<input type="text" name="field'.$field_id.'" id="field'.$field_id.'" value="'.(isset($_SESSION['field'.$field_id])?$_SESSION['field'.$field_id]:'').'"'.$max_lenght_para.' class="email" />';
|
212 |
214 |
}
|
213 |
215 |
if(isset($_SESSION['field'.$field_id])) unset($_SESSION['field'.$field_id]);
|
214 |
216 |
if($field['type'] != '') {
|
little fixes for xhtml-validity module 'form'