Custom Fields
Re-Envisioned
Support General How to store more than one value in a text field?

  • Creator
    Topic
  • #30895
    Tobias
    Participant

    How to store more than one value in a text field in order to create a hierarchy?

    For example:

    In a text field I have the column "location". This can have "Black Forest", "Freiburg", "Berlin" etc.

    Now I want to be able to select only "Freiburg". But right now it just gives me everything that is written in the text field: "Black Forest, Freiburg, Berlin ..."
    So how to separate this right from the import?

Viewing 5 replies - 1 through 5 (of 5 total)
  • Author
    Replies
  • #30907
    Long Nguyen
    Moderator

    Hi,

    The text field is used to store the text value only. If you want to be able to select, please use the field select or checkbox_list.
    https://docs.metabox.io/fields/select/
    https://docs.metabox.io/fields/checkbox-list/

    #30973
    Tobias
    Participant

    Is it not possible to store two values separated with semicolon in a text field?
    That in the frontend it shows up as two values and not one.

    #30976
    Tobias
    Participant

    For an easy real example:

    I have two teacher names inside of a column:

    Teacher Location
    Max|Susan Berlin
    Max Berlin
    Susan Hamburg

    Now in the frontend I built a search&filter. But the teachers of the first line appear as a own teacher "Max|Susan".
    But I only want that you can select Max or Susan.
    The problem is that we import this with .csv file or google sheets sync.

    Is this easy thing not possible with metabox? Or what do I not understand here?

    #30985
    Tobias
    Participant

    And for example with wpallimport and acf, cpt etc. I would have imported the taxonomies and choose a separator:
    https://share.getcloudapp.com/NQuY0Kjp

    So I'm struggling to separate the fields, taxonomies etc. in metabox if I do an import.

    #31008
    Long Nguyen
    Moderator

    Hi,

    I'm afraid that it is not possible to import this kind of data to the Meta Box field's value. You need to import the text only without the separate characters. I will inform the development team to explore the possibility.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.