added free text input with security measures
This commit is contained in:
@ -86,6 +86,17 @@ try {
|
||||
if (isset($q['range'])) $config['range'] = $q['range'];
|
||||
if (isset($q['constraints'])) $config['constraints'] = $q['constraints'];
|
||||
if (isset($q['minSelection'])) $config['minSelection'] = $q['minSelection'];
|
||||
if (isset($q['maxLength'])) $config['maxLength'] = (int)$q['maxLength'];
|
||||
if (!empty($q['multiline'])) $config['multiline'] = true;
|
||||
if (isset($q['otherNextQuestionId'])) $config['otherNextQuestionId'] = $q['otherNextQuestionId'];
|
||||
if (isset($q['otherOptionKey'])) $config['otherOptionKey'] = $q['otherOptionKey'];
|
||||
if (isset($q['config']) && is_array($q['config'])) {
|
||||
foreach (['otherNextQuestionId', 'otherOptionKey', 'hint', 'maxLength', 'multiline', 'textKey'] as $ck) {
|
||||
if (isset($q['config'][$ck])) {
|
||||
$config[$ck] = $q['config'][$ck];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($layout === 'string_spinner' && isset($q['options']) && is_array($q['options'])
|
||||
&& isset($q['options'][0]) && is_string($q['options'][0])) {
|
||||
|
||||
Reference in New Issue
Block a user