• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login
Netgate Discussion Forum
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Search
  • Register
  • Login

How to make setup_wizard.xml <bindtofield>for [installedpackages]?</bindtofield>

Scheduled Pinned Locked Moved pfSense Packages
1 Posts 1 Posters 1.1k Views
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    davidiau
    last edited by Jul 23, 2010, 4:23 AM

    Hi,  I've been trying to write a custom setup_wizard.xml, and I need it to update fields for an installed package, but it doesn't work as expected.
    For instance, if I have a package named 'test' with a variable/field named 'timerdelay', by default it's config is stored to <installedpackages><test><config><timerdelay>value</timerdelay>

    In setup_wizard.xml, if i use

    
     <field><name>timerdelay</name>
    <description>Timer Delay (seconds)</description>
    <type>input</type>
    <bindtofield>installedpackages->test->config->timerdelay</bindtofield></field> 
    
    

    & then run thru the wizard and put '0' in the timerdelay input box it writes the value to
    <installedpackages><test><config>0</config>
    not
    <installedpackages><test><config><timerdelay>0</timerdelay>
    as I expect it to.

    I tried also using

     <field><arraynum>0</arraynum>
    <unsetfield>yes</unsetfield>
    <name>timerdelay</name>
    <description>Timer Delay (seconds)</description>
    <type>input</type>
    <bindtofield>installedpackages->test->config->timerdelay</bindtofield></field> 
    

    but that produces errors in wizard.php and writes an empty config.xml and I have to use backup to restore a working config.
    does anyone know how to make this work?

    Thanks,
    David I</config></test></installedpackages></test></installedpackages></config></test></installedpackages>

    1 Reply Last reply Reply Quote 0
    1 out of 1
    • First post
      1/1
      Last post
    Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.
      This community forum collects and processes your personal information.
      consent.not_received