We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 40041
    • 36 Posts
    Seems like this should be straight-forward, but I can't find any info on how to do it. I'm trying to present the resource editors with the ability to add/edit images that will have links. I'd like for them to be able to select from a "target" dropdown/listbox options like "new", "_blank" and "_self" rather than have them try and remember these options (these are not html fluent people)

    So far I have it working, but only as a text field input:

    [
    {"caption":"Info", "fields": [
        {"field":"title","caption":"Title"},
        {"field":"url","caption":"Click URL","inputTVtype":"URL"},
        {"field":"target","caption":"Target","inputTVtype":"Text"}
    ]},
    {"caption":"Image", "fields":[
        {"field":"image","caption":"Image","inputTVtype":"image"}
    ]}
    ]
    


    Can anyone provide some guidance for the "target" field? I'm guessing it's something like:

    {"field":"target","caption":"Target","inputTVtype":"Listbox"}
    


    But I'm not clear as to how to add the value list in this.

    Thanks!

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

    • discuss.answer
      • 40041
      • 36 Posts
      Isn't that how it always works? Minutes after posting this I find the solution. For those who may also be looking, here is the solution:

      {"field":"target","caption":"Target","inputTVtype":"listbox","inputOptionValues":"_self==_self||new==new||blank==blank","default":"_self"}
      


      inputTVtype being "listbox"

      and inputOptionValues containing your list. You can select the default via the... you guessed it... default value smiley

      Once again ModX/MigX rocks my world!