Trim and some other options: what exactly supposed to do?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Galaxy Express
    Junior Member
    • Feb 2016
    • 28

    Trim and some other options: what exactly supposed to do?

    What exactly supposed to do those options:

    1. Trim. (For example in billingAddressCity entity.)

    2. Disable Text Cut. (For example in billingAddressStreet entity).

    3. Max Length (For example in billingAddressPostalCode entity).

    4. Length of cut (For example in billingAddressStreet entity).

    5. Number of rows of textarea (For example in billingAddressStreet entity).

    Why I'm asking: or I do not see any difference if those options are switched on and off, or I have broken installation
  • yuri
    Member
    • Mar 2014
    • 8627

    #2
    1 Trims white-spaces.
    2. Don't show Show More for long texts.
    3. Max length of the field.
    4. See 2.
    5. Vertical size of text area.
    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

    • Galaxy Express
      Junior Member
      • Feb 2016
      • 28

      #3
      Ok, so:
      1. "Trim" trims white spaces only when show info on view screen and not trims data before store it to db?
      Administration >> Entity Manager >> Account >> Fields >> billingAddressCity >> "Trim" enabled:


      "Edit" view - "View" view - phpmyadmin
      right?
      But it's same for "trim" disabled, btw.

      3. Max Length.
      Administration >> Entity Manager >> Account >> Fields >> billingAddressPostalCode >> "Max Length" set to 5, "Trim" not set:


      So it trims even "trim" is not set and allow to input to field more then 5 chars (it's 3 whitespaces and 9 digits and 3 whitespaces again on screenshot) and show more then 5 chars in "View" view and store more then 5 chars in db

      Same for rest options - it no cuts and not form textfield with given number of rows, etc.

      Tested on fresh install of 3.9.2 and 4.0.0-beta2, Debian 7.9 x64, MySQL 5.5.47-0+deb7u1, PHP 5.4.45-0+deb7u2, Apache 2.2.22
      Install made based on documentation from github.
      Log file:
      Code:
      [2016-02-22 12:50:24] Espo.WARNING: E_WARNING: include(data/config.php): failed to open stream: No such file or directory {"file":"/var/www/espocrm392/application/Espo/Core/Utils/Config.php","line":159} []
      [2016-02-22 12:50:24] Espo.WARNING: E_WARNING: include(): Failed opening 'data/config.php' for inclusion (include_path='/var/www/espocrm392/vendor/phpunit/php-token-stream:/var/www/espocrm392/vendor/phpunit/php-text-template:/var/www/espocrm392/vendor/phpunit/phpunit-mock-objects:/var/www/espocrm392/vendor/phpunit/php-timer:/var/www/espocrm392/vendor/phpunit/php-code-coverage:/var/www/espocrm392/vendor/phpunit/phpunit:/var/www/espocrm392/vendor/symfony/yaml:/var/www/espocrm392') {"file":"/var/www/espocrm392/application/Espo/Core/Utils/Config.php","line":159} []
      What can be wrong?

      Comment

      • yuri
        Member
        • Mar 2014
        • 8627

        #4
        It works with Varchar type of field. Don't work in address field.
        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

        • alasdaircr
          Active Community Member
          • Aug 2014
          • 525

          #5
          Why doesn't Espo just trim all the fields by default, in the UI and when updating the DB? I've never understood this, humans make mistakes all the time and this causes search to drop results.

          Comment

          • yuri
            Member
            • Mar 2014
            • 8627

            #6
            It will trim.
            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

            Working...