Announcement

Collapse
No announcement yet.

Can I use Out-of-the-box field Views and Templates for a custom Field Type?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Can I use Out-of-the-box field Views and Templates for a custom Field Type?

    Hello, I am trying to recreate the Address field Type without the State & Postal Code fields, so:

    1) Field Definition: I created custom/Espo/Custom/Resources/metadata/fields/newAddress.json based on application/Espo/Resources/metadata/fields/address.json but
    without the State and Postal Code fields. The City & Country fields have a "view": "views/fields/address-city" and "view": "views/fields/address-country" respectively.

    2) Views: I went to client/custom/src/views/fields/ to create the views newAddress-city.js, newAddress-country.js, and newAddress.js like how address-city.js, address-country.js, and address.js are created out of the box in client/src/views/fields/

    My question is that both address-city.js & address-country.js import:
    Code:
    import VarcharFieldView from 'views/fields/varchar'
    Can I also import VarcharFieldView from 'views/fields/varchar' to my custom files client/custom/src/views/fields/newAddress-city.js & client/custom/src/views/fields/newAddress-country.js or do I have to create a new custom varchar.js view too? Because varchar.js itself extends base.js
Working...
X