<?xml version='1.0' encoding='UTF-8'?>
<rss version='2.0'>
	<channel>
		<title>cotonti.com : Custom extrafield bug + cot_inputbox</title>
		<link>https://www.cotonti.com</link>
		<description>Laatste forum onderwerpen</description>
		<generator>Cotonti</generator>
		<language>en</language>
		<pubDate>Tue, 14 Apr 2026 22:42:33 -0000</pubDate>

		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>This is not a bug, this is how it is supposed to work. It is a new feature that you are missing: custom empty options and default options for selects. It should be implemented explicitly in cot_selectbox() function, or you could implement it as your own function.</p>
]]></description>
			<pubDate>Za, 16 Mrt 2013 18:06:10 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7371&d=0#post37244]]></link>
		</item>
		<item>
			<title>Eugene</title>
			<description><![CDATA[<p>Yes, and let me clarify a problem, cause you can advise a solution.</p>

<p>As you know there's no <em>placeholder</em> 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:</p>

<pre class="brush:php;">
$R['input_select_rpageoptik'] = '&lt;select required name="{$name}"{$attrs}&gt;'.
	'&lt;option label="Jede Optik" value="" selected="selected"  &gt;Jede Optik&lt;/option&gt;'.
	'{$options}&lt;/select&gt;{$error}';</pre>

<p>But in cot_selectbox <em><strong>selected</strong></em> 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...</p>

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

<p>Moreover, there is <strong>no way to create custom</strong> $R['code_option_empty'] for some custom selectbox.... it is "---" (default) for all empty options in selects...</p>
]]></description>
			<pubDate>Za, 16 Mrt 2013 13:09:54 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7371&d=0#post37240]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	For selectbox you can only use custom HTML for the select itself but not options.</p>
]]></description>
			<pubDate>Za, 16 Mrt 2013 07:53:43 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7371&d=0#post37239]]></link>
		</item>
		<item>
			<title>Eugene</title>
			<description><![CDATA[<p>
	it would be awesome!</p>
<p>
	btw, i guess the same mechanism is in cot_selectbox...</p>
]]></description>
			<pubDate>Vr, 15 Mrt 2013 22:03:57 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7371&d=0#post37234]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	Priorities are actually fine. It's a small bug in cot_inputbox() function which doesn't let you set custom_rc. I'll fix it shortly.</p>
]]></description>
			<pubDate>Vr, 15 Mrt 2013 18:48:23 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7371&d=0#post37233]]></link>
		</item>
		<item>
			<title>Eugene</title>
			<description><![CDATA[<p>
	<strong>2</strong> option is higher priority for the sake of clarity in administration/tuning...</p>
<p>
	As i understand we cannot change last argument of function cot_inputbox (and selectbox) for backward compatibility. Right?<br />
	So, there just a need to assign some RC_name to the html mask from admin area and pass it to functions... But where to store this name? Code is stored right in DB...</p>
<p>
	I'm sure, there's another option of checking things right in cot_inputbox....</p>
<p><strong>Добавлено 2 дня спустя:</strong></p><p>
	<strong>Trust</strong>, do you want me to add this to GitHub?</p>
]]></description>
			<pubDate>Ma, 11 Mrt 2013 15:19:49 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7371&d=0#post37198]]></link>
		</item>
		<item>
			<title>Trustmaster</title>
			<description><![CDATA[<p>
	Any ideas on how to set priorities between these 2?</p>
]]></description>
			<pubDate>Ma, 11 Mrt 2013 12:49:01 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7371&d=0#post37197]]></link>
		</item>
		<item>
			<title>Eugene</title>
			<description><![CDATA[<p>
	When updating/customizing extrafield html code in admin area - it goes to DB (cot_extra_fields) as "field_html".<br />
	Later this content is used to build inputbox (extrafields.php -&gt; function <em>cot_build_extrafields</em>). On line #36 this html goes to <em>cot_inputbox</em> while it is expecting just a custom name of $rc - <strong>NOT the html code</strong> itself (forms.php #67-69)<br />
	So, later it is just <strong>replaced with 'input_default'</strong>.<br /><br />
	Exaple of the code I play with in admin area of extrafields for Pages is<br />
	 </p>
<pre class="brush:xml;">
&lt;input required="required"  type="text" name="{$name}" value="{$value}" {$attrs} /&gt;</pre>
<p>
	or</p>
<pre class="brush:xml;">
&lt;input type="number" name="{$name}" value="{$value}" {$attrs} /&gt;</pre>
<p>
	<br />
	We need clarity on customization proccess. We need to be able to both:</p>
<ol><li>
		Create custom $R[input_{$type}_{$rc_name}] in our plugins</li>
	<li>
		Customize html mask in admin area (this is very beneficial for newbies)</li>
</ol>]]></description>
			<pubDate>Ma, 11 Mrt 2013 10:59:42 -0000</pubDate>
			<link><![CDATA[https://www.cotonti.com/nl/forums?m=posts&q=7371&d=0#post37196]]></link>
		</item>
	</channel>
</rss>