115 return static::renderControlSelector($field, $value,
'combine',
'', $fieldType);
118 $name = static::generateControlName($field);
119 $controlId = static::generateControlId($field);
120 $className = static::generateControlClassName($fieldType, $field);
124 $selectorAttributes =
'';
127 $selectorAttributes = sprintf(
128 'data-role="inline-selector-target" data-property="%s" ',
129 htmlspecialcharsbx(Main\Web\Json::encode($fieldType->
getProperty()))
133 $renderResult = sprintf(
134 '<input type="text" class="%s" name="%s" value="%s" placeholder="%s" %s/>',
135 htmlspecialcharsbx($className),
136 htmlspecialcharsbx($name),
137 htmlspecialcharsbx((
string)$value),
144 $renderResult =
'<input type="text" class="'.htmlspecialcharsbx($className)
145 .
'" size="10" id="'.htmlspecialcharsbx($controlId).
'" name="'
146 .htmlspecialcharsbx($name).
'" value="'.htmlspecialcharsbx((
string) $value).
'"/>';
149 return $renderResult;
171 $value = static::toSingleValue($fieldType, $value);
172 return static::renderControl($fieldType, $field, $value, $allowSelection, $renderMode);
185 if (!is_array($value) || is_array($value) && \CBPHelper::isAssociativeArray($value))
186 $value = array($value);
193 foreach ($value as $k => $v)
195 $singleField = $field;
196 $singleField[
'Index'] = $k;
197 $controls[] = static::renderControl(
208 $renderResult = static::renderPublicMultipleWrapper($fieldType, $field, $controls);
212 $renderResult = static::wrapCloneableControls($controls, static::generateControlName($field));
215 return $renderResult;
226 $value = parent::extractValue($fieldType, $field, $request);
228 if ($value !==
null && is_string($value) && $value <>
'')
230 if (\CBPActivity::isExpression($value))
233 $value = str_replace(
' ',
'', str_replace(
',',
'.', $value));
234 if (is_numeric($value))
236 $value = (float) $value;
241 static::addError(array(
242 'code' =>
'ErrorValue',
244 'parameter' => static::generateControlName($field),