List of values and dependent fields

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • salvix
    Junior Member
    • May 2019
    • 20

    List of values and dependent fields

    Hello, I need to have lists of values in which you can search. Can you do this with EspoCRM?
    I can put lists, but they only search by the beginning of the field.

    And another doubt, is there in EspoCRM the possibility that the addresses are dependent fields of each other? For example, when choosing a country you can only choose certain provinces (states) and then only certain populations.

    Thank you very much.


    Translated with www.DeepL.com/Translator
  • yuri
    Member
    • Mar 2014
    • 8440

    #2
    Hi,

    You can define option list for a varchar field. In Entity Manager.

    There's no address fields dependency available at this moment. You can customize address field. See https://github.com/espocrm/espocrm/b...lds/address.js

    Create custom/Espo/Custom/Resources/metadata/fields/address.json

    Code:
    {
        "view": "custom:views/fields/address"
    }

    Create client/custom/src/views/fields/address.js

    Code:
    define('custom:views/fields/address', 'views/fields/address', function (Dep) {
      return Dep.extend({
          afterRender: function () {
               Dep.prototype.afterRender.call(this);
               // here is your customizations executed after the field is rendered
          },
      });
    });
    Last edited by yuri; 07-16-2019, 06:46 PM.
    If you find EspoCRM good, we would greatly appreciate if you could give the project a star on GitHub. We believe our work truly deserves more recognition. Thanks.

    Comment


    • salvix
      salvix commented
      Editing a comment
      Thank you yurikuzn. Can I search in a varchar with options using "contains" instead of "Starts with"?
Working...