Bug #7082
open
pkg_edit.php - impossible to use default_value with rowhelperfield
Added by Kill Bill almost 8 years ago.
Updated over 5 years ago.
Affected Architecture:
All
Description
I mean, things like:
<rowhelperfield>
<fielddescr>Test select</fielddescr>
<fieldname>testselect</fieldname>
<type>select</type>
<options>
<option><name>One</name><value>one</value></option>
<option><name>Two</name><value>two</value></option>
</options>
<default_value>one</default_value>
</rowhelperfield>
or
<rowhelperfield>
<fielddescr>Test input</fielddescr>
<fieldname>testinput</fieldname>
<type>input</type>
<default_value>Test default value</default_value>
</rowhelperfield>
The <default_value>
tag does nothing.
I will investigate.
I presume the desired functionality is that if the element has no current (stored) value, the default_value should be used to set it?
I'm kinda unsure that the <default_value> works like that even for non-rowhelperfield fields. :-) What I see in packages is lots of things like
$foo = $somepkgconfig['foo'] ?: 'default';
But with fields outside rowhelper, the value is printed and gets used on save. You cannot get any such thing with <rowhelperfield>
at the moment. Also, it's a useful hint to show the default value without adding additional descriptions - plus, the <description>
tags are a no go here as well, see https://redmine.pfsense.org/issues/5673#note-5
- Target version changed from 2.4.0 to 2.4.1
- Target version changed from 2.4.1 to 2.4.2
- Target version changed from 2.4.2 to 2.4.3
- Target version changed from 2.4.3 to 2.4.4
This will not be addressed in 2.4.3 :( We are looking at alternative ways of providing this functionality.
- Target version changed from 2.4.4 to Future
- Category changed from Web Interface to Package System
Also available in: Atom
PDF