We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43558
    • 9 Posts
    Hi,

    Something simple i'm sure:

    I have a listbox with input options label1==image1||label2==image2||label3==image3

    I need it to show the labels in the resource template variables section so the would choose either label1, label2 or label3

    and then output the relevant image name. At present it only outputs the label

    <div class="tag2_ab"><img alt="" src="images/[[+tv.propertyStatus]].png" /></div>


    How can i adapt this to output the value instead of the label?

    thanks
      • 4172
      • 5,888 Posts
      you should allways get the value, not the label as output. The value is stored into the db, not the label.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 43558
        • 9 Posts
        Quote from: Bruno17 at May 02, 2013, 08:36 AM
        you should allways get the value, not the label as output. The value is stored into the db, not the label.

        Thanks but in the code i posted above i get
        src="images/label1.png"
        as opposed to
        src="images/image1.png"
        which is what i'm after????
          • 4172
          • 5,888 Posts
          did you have the input-options like that

          label1==image1||label2==image2||label3==image3

          from the beginning, or did you change them after having saved the resources?
          definitiv, after saving a listbox-TV, the value (after '==') is the one, which is in the DB.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!
            • 43558
            • 9 Posts
            Quote from: Bruno17 at May 02, 2013, 08:54 AM
            did you have the input-options like that

            label1==image1||label2==image2||label3==image3

            from the beginning, or did you change them after having saved the resources?
            definitiv, after saving a listbox-TV, the value (after '==') is the one, which is in the DB.

            Interesting. I changed this after creating the TV. Do i need to create a new variable or edit in the DB somehow?

            thanks
              • 43558
              • 9 Posts
              Quote from: hatchmedia at May 04, 2013, 08:03 AM
              Quote from: Bruno17 at May 02, 2013, 08:54 AM
              did you have the input-options like that

              label1==image1||label2==image2||label3==image3

              from the beginning, or did you change them after having saved the resources?
              definitiv, after saving a listbox-TV, the value (after '==') is the one, which is in the DB.

              Interesting. I changed this after creating the TV. Do i need to create a new variable or edit in the DB somehow?

              thanks

              I've just checked the dbase and the value is correct for the template variable but its still outputting the label not the value???