Project

General

Profile

Actions

Bug #7082

open

pkg_edit.php - impossible to use default_value with rowhelperfield

Added by Kill Bill almost 8 years ago. Updated about 5 years ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
Package System
Target version:
Start date:
01/05/2017
Due date:
% Done:

0%

Estimated time:
Plus Target Version:
Release Notes:
Affected Version:
2.3.x
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.

Actions #1

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?

Actions #2

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

Actions #3

Updated by Anonymous over 7 years ago

  • Target version changed from 2.4.0 to 2.4.1
Actions #4

Updated by Jim Pingle about 7 years ago

  • Target version changed from 2.4.1 to 2.4.2
Actions #5

Updated by Jim Pingle about 7 years ago

  • Target version changed from 2.4.2 to 2.4.3
Actions #6

Updated by Anonymous over 6 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.

Actions #7

Updated by Anonymous over 6 years ago

  • Target version changed from 2.4.4 to Future
Actions #8

Updated by Jim Pingle about 5 years ago

  • Category changed from Web Interface to Package System
Actions

Also available in: Atom PDF