Bug #7082
openpkg_edit.php - impossible to use default_value with rowhelperfield
0%
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.
Updated by Anonymous almost 8 years ago
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?
Updated by Kill Bill almost 8 years ago
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
Updated by Anonymous over 7 years ago
- Target version changed from 2.4.0 to 2.4.1
Updated by Jim Pingle about 7 years ago
- Target version changed from 2.4.1 to 2.4.2
Updated by Jim Pingle about 7 years ago
- Target version changed from 2.4.2 to 2.4.3
Updated by Anonymous almost 7 years ago
- 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.
Updated by Anonymous over 6 years ago
- Target version changed from 2.4.4 to Future
Updated by Jim Pingle over 5 years ago
- Category changed from Web Interface to Package System