Setup Default values/filters/sorting

From Dolibarr ERP CRM Wiki
Jump to navigation Jump to search

Help About Screen: Default values/filters/sorting

Menu Path: Home ► Setup ► Default values/filters/sorting

Default values/filters/sorting Setting
Default values/filters/sorting Setting

This menu allows you to fill fields with default value for Values in cards, filters and sorting in lists.
Warning.png Technical knowledge is required to read the content of the HTML pages to get the URL or the key name of a field

Identify the fields

  • Relative URL : You must enter the relative path of the page URL. If you include parameters in URL, the default values will be effective if all parameters are set to same value.
    Example:
    For the form to create a new third party, it is societe/card.php.
    For URL of external modules installed into custom directory, do not include the "custom/", so use path like mymodule/mypage.php and not custom/mymodule/mypage.php.
    If you want default value only if url has some parameter, you can use societe/card.php?abc=val1&def=val2
    Also note that overwritting default values for form creation works only for pages that were correctly designed (so with parameter action=create or presend...)
  • Field : This is the name of the HTML field. Technical knowledge is required to read the content of the HTML page to get the key name of a field : Find the id="xxxxxxx"
  • Value : You can use any fixed values of use the Variable substitution system

Default values (to use on forms)

Default values used on all the forms (card, etc.) Three fields need to be filled :

  • Relative URL : Should be a card.php
  • Field
  • Value

Default search filters

Three fields need to be filled :

  • Relative URL : Should be a list.php
  • Field
  • Value

Default sort orders

Three fields need to be filled :

  • Relative URL : Should be a list.php
  • Field
  • Sort order : put ASC for ascending and DESC for descending

Default focus fields

Two fields need to be filled :

  • Relative URL : Should be a list.php
  • Field

Mandatory form fields

Warning.png Feature supported on text fields only. Also an URL parameter action=create or action=edit must be set OR page name must end with 'new.php' to trigger this feature. Two fields need to be filled :

  • Relative URL
  • Field