We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 8167
    • 18 Posts
    hello.
    its about REVO.
    basically a need TVs to show up in form in the way i see it in manager - not a tv value but input type like select, radio etc... how to? should be simple i guess.

    i have docs with many TVs and getresources call with TVfilters for doc output.
    i use form to make POST request and simple getPost snippet to feed getresources with parameters.
    the only question is how to output TVs in from instead of building custom form?

    [ed. note: dub last edited this post 14 years, 1 month ago.]
      • 4172
      • 5,888 Posts
      perhaps this is something, which can help:

      https://forums.modx.com/?action=thread&thread=73711
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 3749
        • 24,544 Posts
        A TV tag for those kinds of TVs in the front end is always replaced with the value of the TV selected in the Manager.

        You could use a custom snippet. This should work to get the values you see in the Manager:

        <?php
        $tv = $modx->getObject('modTemplateVar', array('name' => 'MyTv'));
        
        if ($tv) {
           $options = $tv->get('elements');
        }
        
        /* create your output here */
        
        return $output;



        [update] Bruno17 and I wrote our messages at the same time. Definitely check out Bruno17's snippet, which is quite nicely designed to do what I was suggesting.



        ------------------------------------------------------------------------------------------
        PLEASE, PLEASE specify the version of MODX you are using.
        MODX info for everyone: http://bobsguides.com/modx.html [ed. note: BobRay last edited this post 14 years, 1 month ago.]
          Did I help you? Buy me a beer
          Get my Book: MODX:The Official Guide
          MODX info for everyone: http://bobsguides.com/modx.html
          My MODX Extras
          Bob's Guides is now hosted at A2 MODX Hosting