We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38666
    • 98 Posts
    I have a custom member information table with three fields
    <field key="pscope" dbtype="varchar" precision="100" phptype="string" null="true"/>
    <field key="gscope" dbtype="varchar" precision="100" phptype="string" null="true"/>
    <field key="tscope" dbtype="varchar" precision="100" phptype="string" null="true"/>
    

    which draw their information from another custom (look-up) table
    <object class="csaacscope" table="csaac_accred_scope" extends="xPDOSimpleObject">
        <field key="accred_scope" dbtype="varchar" precision="255" phptype="string" null="true" />
    </object>
    

    In Migx formtabs for each of the three fields (pscope, gscope and tscope) I have set the Input TV type to listbox and the Input value option to:
    @SELECT scope FROM modx_csaac_accred_scope

    When I run my CMP page to update the custom member information table the following error is generated.
    Fatal error: Cannot redeclare class modTemplateVarInputRenderListbox in F:\WebDev\CSAAC\core\model\modx\processors\element\tv\renders\mgr\input\listbox.class.php on line 41

    The message is clear enough, but how can I reuse the same TV Input for the three, (pscope, gscope and tscope) fields.

    This question has been answered by jimsheppard. See the first response.

      Give a man the answer, and he’ll only have a temporary solution. Teach him the principles that led you to that answer, and he will be able to create his own solutions in the future.
      • 4172
      • 5,888 Posts
      never have seen this error.

      Are you using inputTV or inputTVtype?

      Does it work without the @SELECT - Binding?

        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 38666
        • 98 Posts
        Quote from: Bruno17 at Feb 18, 2015, 01:28 PM
        never have seen this error.

        Are you using inputTV or inputTVtype?

        Does it work without the @SELECT - Binding?

        Bear with me this is my first foray into Migx (and I like what I see so far) and template variables have been very scary for me.
        Since my post I have tried a few things
        At the start I was using inputTVtype 'Listbox' and @SELECT
        To see if I could clear the error message I tried creating a TV [[*Ascope]] and added the name Ascope to the inputTV box .... still with error
        Next I tried using inputTVtype 'Listbox' with a piped string of option/value pairs as Input Option Values .... still with error.

        If I remove the listbox TV from the three fields (pscope, gscope and tscope), which of course defeats the purpose the error message disappears. I do have a list box on an earlier field which draws its values from a different table and this is not causing a problem.

        UPDATE: Just tried adding the other listbox, same problem. The CMP will only accept one listbox.
        [ed. note: jimsheppard last edited this post 11 years, 8 months ago.]
          Give a man the answer, and he’ll only have a temporary solution. Teach him the principles that led you to that answer, and he will be able to create his own solutions in the future.
          • 4172
          • 5,888 Posts
          would you like to give me access to the manager?
          Send me a PM then.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
          • discuss.answer
            • 38666
            • 98 Posts
            Bruno, I'm a bit red-faced here.... but I solved the problem, sometimes we can't see the forest for the trees!
            @SELECT scope FROM modx_csaac_accred_scope

            should read
            @SELECT [b]accred_scope[/b] FROM modx_csaac_accred_scope


            Not a total wasted day I learned a lot about TV's, hope I can remember it when I need it.

            Thanks for your help once again
            Cheers
            Jim
              Give a man the answer, and he’ll only have a temporary solution. Teach him the principles that led you to that answer, and he will be able to create his own solutions in the future.