• Resolved grungyape

    (@grungyape)


    Before I start making extra tables to hold my 2 dropdown fields, and then setting up relationships, is there any way to set up WP DA with preset input fields?

    The core table has 2 varchar fields which have set values (1-8 locations) and (1-10 offices). On the old PHP form we had the HTML input from set with these options, so all users entered only what we wanted.

    Thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • I created a field of type “enum” which is a list of values that can be selected for that field.

    ENUM(val1, val2, val3, …) A string object that can have only one value, chosen from a list of possible values. You can list up to 65535 values in an ENUM list. If a value is inserted that is not in the list, a blank value will be inserted. The values are sorted in the order you enter them

    https://www.w3schools.com/sql/sql_datatypes.asp

    Thread Starter grungyape

    (@grungyape)

    Interesting, I thought when I read about ENUM that is was not a “string” field, but numeric. The values we are using are office name and locations, so for us, its a list of 8 US States (Ohio, Indiana, etc) and 10 physical offices (West Bank, Tri-State, etc.)

    I’ll take a closer look.

    I have used “ENUM” fields with string values.
    This really makes keeping the data consistent a lot easier.

    You might also check the WP Data Access documentation about “Inline Editing”
    This allows a drop down list of items and makes editing records a lot faster and easier.

    https://wpdataaccess.com/docs/documentation/data-explorer/column-settings/

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Dropdown Input Fields?’ is closed to new replies.