Skip to content

Commit 42256f4

Browse files
paulofariadiasMartinSchoeler
authored andcommitted
(DOCS): Edit Custom fields (RocketChat#1448)
* (DOCS): Edit Custom Fields * Edit Custom fields * Update header
1 parent 337e284 commit 42256f4

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed
Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
# Custom Fields
22

3-
In Rocket.Chat you can set customized fields for user registration. An example would be adding a field `address` or `role`, where the user could select from various roles of a company.
3+
In Rocket.Chat you can set customized fields for user registration. By adding an `address` or `role` field, where the user could select from various roles of a company, for example.
44

5-
> Note: Unfortunately for now you might need some basic javascript and Rocket.Chat's internal workings understanding to set custom fields different from the example below. A more _user friendly_ interface is planned for the future.
5+
**Note**: Currently you may need some basic understanding of Javascript, and Rocket.Chat's internal working structure to set other custom fields than in the example below. A more _user-friendly_ interface is planned for the future.
66

7-
You can set custom fields under `Administration -> Accounts -> Registration -> Custom Fields`.
7+
You can set custom fields under `Administration > Accounts > Registration > Custom Fields`.
88

9-
Custom fields will show up when a user registers and when an admin look for that user's information.
9+
Custom fields show up when a user registers, and when an admin looks for that user's information.
1010

11-
For now, you need to set custom fields using a [JSON object](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON).
11+
For now, set custom fields using a [JSON object](https://developer.mozilla.org/en-US/docs/Learn/JavaScript/Objects/JSON).
1212

13-
Make sure to use a valid `JSON` where `keys` are the `field names` containing a dictionary of field settings. Example:
13+
Make sure to use a valid `JSON`, where `keys` are the `field names` containing a dictionary of field settings. Example:
1414

1515
```json
1616
{
@@ -33,28 +33,28 @@ Make sure to use a valid `JSON` where `keys` are the `field names` containing a
3333
}
3434
```
3535

36-
In this example we are setting two new fields, we will go over each proadressperty of these fields:
36+
In the example above we set two new fields with the following properties:
3737

38-
- **type**: This defines the type of the field, currently we have 2 types: `select` and `text`. Where `select` creates a dropdown list and `text` creates a plain text form.
38+
- **type**: defines the type of the field, currently there are 2 types: `select` and `text`, where `select` creates a dropdown list, and `text` creates a plain text form.
3939

40-
- **defaultValue**: This is to be used with a `select` form type. This sets the default option for the list.
40+
- **defaultValue**: used with a `select` form type to set the default option for the list.
4141

42-
- **options**: This is to be used with a `select` form type. These are the values that should be on the dropdown list. You need to use a [javascript Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) to create this. It follows this pattern `["item1", "item2","item3"]`.
42+
- **options**: used with a `select` form type for the values that should be on the dropdown list, which follows the `["item1", "item2","item3"]` pattern. Use a [javascript Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array) to create it.
4343

44-
- **required**: This sets if the field is required for registration. You should use `true` or `false` in this property.
44+
- **required**: defines if the field is required for registration; use `true` or `false` in this property.
4545

46-
- **minLength**: This is to be used with a `text`. This defines the minimum length required in the form.
46+
- **minLength**: used with a `text` to define the minimum length required in the form.
4747

48-
- **maxLength**: This is to be used with a `text`. This defines the maximum length required in the form.
48+
- **maxLength**: used with a `text` to define the maximum length required in the form.
4949

50-
- **modifyRecordField**: If you are adding a field that already exists in Rocket.Chat, you will need to use this property.
50+
- **modifyRecordField**: this property is required when you add a field that already exists in Rocket.Chat.
5151

52-
- **array**: This is to be used inside the `modifyRecordField` property. This defines if the existing field is an array.
52+
- **array**: used inside the `modifyRecordField` property to define if the existing field is an array.
5353

54-
- **field**: This is to be used inside the `modifyRecordField` property. This should be the name of the existing field.
54+
- **field**: used inside the `modifyRecordField` property; it should be the name of the existing field.
5555

56-
- **public**: This defines the field as visible for other users when looking at a user profile.
56+
- **public**: defines the field as visible for other users when looking at this user's profile.
5757

58-
- **private**: This defines the field as private, so only users with the permission `view-full-other-user-info` will be able to see this field when viewing that user profile.
58+
- **private**: defines the field as private, so only users with `view-full-other-user-info` permission can see this field when viewing this user's profile.
5959

60-
> Note: Please use `tabs` for indentation, if you use `spaces` for indentation the fields will not work.
60+
**Note**: Fields work with `tabs` for indentation, avoid using `spaces`.

0 commit comments

Comments
 (0)