We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 27330
    • 884 Posts
    How can I display a drop down TV for visitor to choose from?
    I’m working on products shop and need to give ’em the option to choose size.
    I don’t see any widget for it but hope it’s doable?

    TIA.
      • 27330
      • 884 Posts
      ok 1/4 way there:
      If I choose
      Input Type: DropDown List Menu
      Input Option Values: SM==Small||LG==Large||XLG==Extra Large||XXLG==Extra Extra Large
      Widget: HTML Generic Tag
      Tag: Select

      I can see the drop down in front end but not my options sad
      anyone mind correcting me?

        • 27330
        • 884 Posts
        fellows don’t mean to be an a$$ and bump it like that, but since no one reply im not sure now if i can do it at all with TV or should I go the manual way? or is it just the weekend ? laugh
          • 33982 ☆ A M B ☆
          • 476 Posts
          How can I display a drop down TV for visitor to choose from?
          I’m working on products shop and need to give ’em the option to choose size.
          I don’t see any widget for it but hope it’s doable?
          If I’m understanding what you’re trying to accomplish, you want for visitors on the website to be able to have the ability to be able to choose size for a product on the site, correct?

          Something like this?  Is this all you’re trying to do?

          <select name="size">
                  <option value="Small">Small</option>
                  <option value="Large">Large</option>
          </select>

          I know you’ve already thought that through, but what I guess I’m a bit unclear about is do you need the ability to have the Manager be able to enter values into the T.V. that is the drop down on the front of the website for the visitor?  Is that what you’re trying to accomplish?  I’m not completely understanding where you’re getting hung up.
            Precision Web Development ... SmashStack.com
            • 27330
            • 884 Posts
            exactly like your example, I want to let visitor set the value for drop down TV.
              • 33337
              • 3,975 Posts
              Zaigham (aka zi) Reply #6, 18 years ago
              I think you will have to add the values in "TV Value" not in "Input Options".... try that tongue
                Zaigham R - MODX Professional | Skype | Email | Twitter

                Digging the interwebs for #MODX gems and bringing it to you. modx.link
                • 4172
                • 5,888 Posts
                I think you need something like that in your formgenerator-snippet:

                <?php
                // GetInputByTv
                global $modx;
                $idname=(isset($idname)) ? $idname:"";
                $fields= "*";
                $docid= (isset($docid)) ? $docid :"";
                $published= 1;
                
                $tv = $modx->getTemplateVar($idname, $fields, $docid, $published);
                
                include_once ('tmplvars.commands.inc.php');
                include_once ('tmplvars.inc.php');
                
                $output=renderFormElement($tv['type'], $tv['name'], $tv['default_text'], $tv['elements'], $tv['value'], $tv['style']);
                return $output;
                ?>


                Bruno
                  -------------------------------

                  you can buy me a beer, if you like MIGX

                  http://webcmsolutions.de/migx.html

                  Thanks!
                  • 31136
                  • 72 Posts
                  If you want to add control of some TV to frontend, you can use Quill snippet in control-mode.
                  Example: [!Quill? &mode=’control’ &name=’Size’!]
                  Here "Size" is your TV name.
                  Generated control name will be "tvSize", and you can add snippet call to your form body and process values in $_REQUEST array ;-)
                  Link to snippet page: http://www.modxcms.com/Quill-2172.html
                    • 27330
                    • 884 Posts
                    Quote from: zi at Oct 13, 2008, 12:37 AM

                    I think you will have to add the values in "TV Value" not in "Input Options".... try that tongue

                    didn’t work. that would be nice if it would smiley

                    @Urique I’ll try that and see if it works. thanks.