We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 21884
    • 57 Posts
    I’m using TVs as a way to categorize content on my site, i’ve asked some other questions [url href="/forums/index.php/topic,50428.0.html"]here[/url].

    i’m wondering if it’s possible to have 2 input types available for a single TV, basically i’d do a @SELECT query first and present a drop-down with options that have been previously entered as values for this TV on documents in the site, and allow the user to use one of those options as a choice for that TV, alternatively i’d like them to be able to enter a new value if the options available aren’t what is needed.

    does that make sense?

    basically user creates document, and "location" TV = either drop-down with previously entered locations, or text box to add new location.

    from what i can tell it’s easy enough to provide the drop-down... (i think??) but not sure how to have both...
      • 4172
      • 5,888 Posts
      you can create two tvs: one dropdown with @SELECT or @EVAL-binding and one text-TV.
      then listen in onBeforeDocformSave and/or in onDocFormSave - Event for that text-TV.
      If there is a new value, add it to your location-list. At the same time you can empty that TV and store its value as choice to your dropdown-TV.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 21884
        • 57 Posts
        so i’ll need to write a plugin basically?
          • 4172
          • 5,888 Posts
          Yes I think so. You can store your location-list directly as input-options-values and alter them with that plugin, if there is a new location given in that text-TV.
          Then you don’t need bindings.
            -------------------------------

            you can buy me a beer, if you like MIGX

            http://webcmsolutions.de/migx.html

            Thanks!