diff --git a/docs/apis/core/customfields/index.md b/docs/apis/core/customfields/index.md index cddf2bfeff..79c3e15769 100644 --- a/docs/apis/core/customfields/index.md +++ b/docs/apis/core/customfields/index.md @@ -54,7 +54,7 @@ handler::setup_edit_page() // Sets page context/url/breadcrumb for the customfie ### Add custom fields to the instance edit form -Custom fields are added to the **instances**. For example, course custom fields are added to the courses, so `courseid` is the `instanceid`. In the example of [mod_surveybuilder](https://github.com/marinaglancy/moodle-mod_surveybuilder) we use `$USER->id` as the `instanceid` (which means that in this example one user can fill the survey in one module only once). In each case of using custom fields there should be a clear concept of an **instance**. `Instanceid` is required to save the data but it may be empty when we render the instance edit form (for example, the course is not yet created). +Custom fields are added to the **instances**. For example, course custom fields are added to the courses, so `courseid` is the `instanceid`. In the example of [`mod_surveybuilder`](https://github.com/marinaglancy/moodle-mod_surveybuilder) we use `$USER->id` as the `instanceid` (which means that in this example one user can fill the survey in one module only once). In each case of using custom fields there should be a clear concept of an **instance**. `Instanceid` is required to save the data but it may be empty when we render the instance edit form (for example, the course is not yet created). Developer must add custom field callbacks to the instance edit form. If the instance is "made up" (like in `mod_surveybuilder`), a new form has to be created with `id` field in it that will refer to the `instanceid`. diff --git a/docs/apis/plugintypes/customfield/index.md b/docs/apis/plugintypes/customfield/index.md index 920373ead2..b4a681bbff 100644 --- a/docs/apis/plugintypes/customfield/index.md +++ b/docs/apis/plugintypes/customfield/index.md @@ -6,7 +6,7 @@ tags: - Custom field --- -Custom fields allow you to create field types to be used for custom fields. Instances of these field types can be added to the respective areas that implement [Custom fields API](/docs/apis/core/customfields). Currently in Moodle core only courses implement this API, however custom fields are also used in addon plugins for other areas. For example, if you want to display radio buttons on the course edit page, then you can add an instance of a radio custom field plugin to the Course custom fields configuration. +Custom fields allow you to create field types to be used for custom fields. Instances of these field types can be added to the respective areas that implement [Custom fields API](../../core/customfields/index.md). Currently in Moodle core only courses implement this API, however custom fields are also used in addon plugins for other areas. For example, if you want to display radio buttons on the course edit page, then you can add an instance of a radio custom field plugin to the Course custom fields configuration. import { Lang, @@ -125,5 +125,5 @@ The `instance_form_definition()` function adds any required field elements that ## See Also -- [Custom files API](/docs/apis/core/customfields) +- [Custom files API](/../../core/customfields/index.md) - [User Profile Fields](https://docs.moodle.org/dev/User_profile_fields)