English
form.render.before
About 316 wordsAbout 1 min
2025-09-22
Triggered before the form is rendered, when the object layout description data has already been obtained.
- Intercept master-object field components and implement them in the plugin
Parameters
| Parameter | Description | Type |
|---|---|---|
| title | Default title text | Object |
| buttons | Generic buttons of the master object. Elements in the buttons array can be modified directly in the plugin{api_name:"",action:"",label:"",onClick:()=>{}} | Array |
| tabs | Top navigation tabs | Array |
Return Value
| Parameter | Description | Type |
|---|---|---|
| title | Modified title. If empty, the default title is used | String |
| master_field_components | Declares overridden master-object field components | Object |
| detail_field_components | Declares overridden detail-object field components (inside the form component) | Object |
| layoutFieldDesExt | Extends the layout field description information of master/detail objects | Object |
| fixedComponents | Declares popup components implemented inside the plugin, such as a custom alert component | Array |
| tabsConfig | Configures properties related to top navigation tabs, such as label and hidden state | Object |
| isSkipLayoutFieldStateCheck | Whether to skip the default layout validation when setting field states | Boolean |
| beforeUiAction | Intercepts or processes UI button input parameters before UI button execution | Function |
| beforeSaveDraft | Intercepts or processes draft saving before execution | Function |
Code Example
Modify the title bar text
{
event: "form.render.before",
functional: function (pluginExecResult, options) {
return {
title: "Title modified by plugin",
}
}
}Override the master-object field component
{
event: "form.render.before",
functional: function (pluginExecResult, options) {
return {
master_field_components: {
"testfield": {
resource: "custom_plugin",
prop: {
pluginInfo: pluginParam.describe,
comInfo: {
name: "",
prop: {},
renderMode: "value",
}
}
}
}
}
}
}Complete example of a custom master-object field component
Override the detail-object field component
Effective range:
- Detail-object tile mode
- All field editing in detail-object card and table modes, excluding exposed fields
Extend or modify layout field description information
Popup component implemented inside the plugin
Complete example of a custom popup component
Configure top navigation tab properties
Intercept or process draft saving
Intercept or process UI buttons
Notes
- Calling
dataUpdaterto update master/detail data in this event is not suitable.
