We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40092
    • 265 Posts
    For instance, i have a single select listbox with options 1 through 5 and the value stored in database is 3, how would i make that option the default selected in mixgdb?

    note: in the documentation i firstly found reference to using dropdown TV as inut type, but i later found that dropdown does not exist since 2.1, maybe need to update that? ;-)

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

    [ed. note: thapriest86 last edited this post 13 years, 6 months ago.]
      • 4172
      • 5,888 Posts
      If your input-option-values are
      1||2||3||4||5


      and you have '3' as value in the db for this field, it should be selected.
      Isn't it?
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 40092
        • 265 Posts
        It does not, unfortunetaly.

        I'm exactly using: 2.5||3.0||3.5||4.0||4.5||5.0 with default 2.5 or empty it does not work.
          • 4172
          • 5,888 Posts
          which value do you get, when you make this field a textbox (no inputTVtype)
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 40092
            • 265 Posts
            Hmmm, then i get the value back without .0, while in database it has 4.0. let me try something
              • 40092
              • 265 Posts
              Tried with a comma, instead of a dot. It cuts that off as well. [ed. note: thapriest86 last edited this post 13 years, 6 months ago.]
                • 4172
                • 5,888 Posts
                what's the definition for this field in your xml-schema?
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 40092
                  • 265 Posts
                  <field key="klasse" dbtype="decimal" precision="5,1" phptype="float" null="false" />
                  • discuss.answer
                    • 4172
                    • 5,888 Posts
                    does it work with phptype="string" ?

                    don't forget to run 'parse schema' after changing the schema.
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 40092
                      • 265 Posts
                      Works! smiley Thanks again, Bruno.
                      Í'm curious though as t why it would not work with float. (isn't this notation what float is meant for?)

                      Might you also know, why radio's are not showing up? input type = radio. [ed. note: thapriest86 last edited this post 13 years, 6 months ago.]