List field with dropdown instead of reference

danpatino
Tera Expert

This might end up having a really simple solution I am just not aware of.

I built an application that had a List field type on one form with configured choices.   The default behavior for this field type is a dropdown to make selections.

Before.jpg

However, I then got the requirement to have these options configurable on a separate table.   So I created a table and had this field reference it.   It works fine except the selection is now in 'reference' format.

After.jpg

There are less than 10 entries in this 'lookup' table.   In order to convert it back to a dropdown style entry, I've tried the following:

  1. In the field dictionary entry >> 'Choice List Specification' section >> 'Choice' field I've chosen 'None', 'Dropdown without None', and 'Dropdown with None'
  2. Added ref_auto_completer=AJAXReferenceChoice as a dictionary attribute
  3. Added max_ref_dropdown=20 as a dictionary attribute

Any more ideas on what to try or whether this is possible?   My next approach is to get the control using an onload client script and manipulate the DOM but I really hate going that route and would like to avoid it if possible.

Thanks in advance!

5 REPLIES 5

Michael Fry1
Kilo Patron

Can you change the Type on the field (in the dictionary) to Choice or String with choice list?


Thanks for the input Michael.



Unfortunately we have to capture multiple inputs so changing it to Choice or String is not an option.


mike_allgire
Giga Guru

A list field is a reference type field, so you can't use a drop-down. That drop-down just displays because you haven't (or hadn't) selected the referencing table yet.


Mike,



Thanks for the reply.



Fields of type 'Reference' can be converted to drop-downs by adding the attributes I listed in the original post.   Also, when I hadn't specified the reference table, the List field displayed the Choices (sys_choice) entries in the drop-down format.



I still feel there is a solution out there.   I haven't given up hope yet!