Field default data multi enum

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Nishan Perera
    Active Community Member
    • Jan 2019
    • 348

    Field default data multi enum

    Hi,

    Is it possible to define default field data in multi enum ?
    Cheers!
    Nishan.
  • Maximus
    Senior Member
    • Nov 2018
    • 2731

    #2
    Hi Nishan,
    you need to do it via code.
    1. Please open the file /custom/Espo/Custom/Resources/metadata/entityDefs/Your-Entity.json
    2. Define the multi-enum field default options as on the example below:
    Code:
    "multiEnum": {
        "type": "multiEnum",
        "storeArrayValues": true,
        "options": [
            "London",
            "Kiev",
            "Washington",
            "Oslo",
            "Minsk"
        ],
    [COLOR=#2ecc71]   "default": [
            "London",
            "Kiev",
            "Oslo"
        ],[/COLOR]
        "style": {
            "London": null,
            "Kiev": null,
            "Washington": null,
            "Oslo": null,
            "Minsk": null
        },
        "isCustom": true
    }

    Comment


    • Nishan Perera
      Nishan Perera commented
      Editing a comment
      Hi Max,

      Thank you so much!
Working...