Project

General

Profile

Actions

Bug #7082

open
KB

pkg_edit.php - impossible to use default_value with rowhelperfield

Bug #7082: pkg_edit.php - impossible to use default_value with rowhelperfield

Added by Kill Bill over 9 years ago. Updated about 7 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.

Updated by Anonymous over 9 years ago Actions #1

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?

KB Updated by Kill Bill over 9 years ago Actions #2

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 about 9 years ago Actions #3

  • Target version changed from 2.4.0 to 2.4.1

JP Updated by Jim Pingle almost 9 years ago Actions #4

  • Target version changed from 2.4.1 to 2.4.2

JP Updated by Jim Pingle almost 9 years ago Actions #5

  • Target version changed from 2.4.2 to 2.4.3

Updated by Anonymous over 8 years ago Actions #6

  • 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 about 8 years ago Actions #7

  • Target version changed from 2.4.4 to Future

JP Updated by Jim Pingle about 7 years ago Actions #8

  • Category changed from Web Interface to Package System
Actions

Also available in: Atom