Forums / Cotonti / Bugs / Custom extrafield bug + cot_inputbox

cot_inputbox resetting custom html code for extrafield

Eugene
#37240 2013-03-16 13:09

Yes, and let me clarify a problem, cause you can advise a solution.

As you know there's no placeholder for select. And there several ways to emulate it. Simple html-way is to include empty-value-option into select before all other selects. So, there's line for custom select in RC:

$R['input_select_rpageoptik'] = '<select required name="{$name}"{$attrs}>'.
	'<option label="Jede Optik" value="" selected="selected"  >Jede Optik</option>'.
	'{$options}</select>{$error}';

But in cot_selectbox selected is already build-in and always assign to one of assigned options. This way I will have 2 selected options. Also, as empty-value-option is not in array of assigned values I will get error (field_notinarray_..) from extrafield_import...

You may say, "so, add empty value by $add_empty = true".  But it is not possible, cause it also not custom in cot_build_extrafields.

Moreover, there is no way to create custom $R['code_option_empty'] for some custom selectbox.... it is "---" (default) for all empty options in selects...