Back to Nocobase

China Region Field

docs/docs/en/system-management/index.md

2.0.511.6 KB
Original Source

China Region Field

The China Region field is used to store province, city, and district/county information for China.

The data source for this field type comes from Administrative-divisions-of-China.

Installation

In the main NocoBase interface, go to "Plugin Manager", find the "China Region Field" plugin, and enable it.

Usage

After enabling the plugin, you can add a "China Region" type field in the collection configuration.

In a form, you can select the province, city, and district/county in a cascading manner.

Field Configuration

Storage Format

  • Code: Stores the codes for the province, city, and district/county, e.g., 110101.
  • Name: Stores the names of the province, city, and district/county, e.g., Beijing/Beijing/Dongcheng District.
  • Code and Name: Stores both codes and names, e.g., {"province":{"code":"110000","name":"Beijing"},"city":{"code":"110100","name":"Beijing"},"area":{"code":"110101","name":"Dongcheng District"}}.

Display Format

  • Code: Displays the codes for the province, city, and district/county, e.g., 110101.
  • Name: Displays the names of the province, city, and district/county, e.g., Beijing/Beijing/Dongcheng District.

Default Value

You can set a default province, city, and district/county.