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



  • 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>


Log in to reply