> For the complete documentation index, see [llms.txt](/llms.txt)

# GS2-Formation Script Trigger Reference

Reference for event triggers that call extended scripts



## Trigger

### updateMold

Form Storage Area capacity update

**Related methods:**
setMoldCapacityByUserId - Set capacity size with specified user ID


#### Synchronous Execution Script

The script is executed synchronously before the form storage area capacity update process.

##### Request

| | Type | Description |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | Namespace |
| mold | [Mold](../sdk/#mold) | Form Storage Area before update |
| afterMold | [Mold](../sdk/#mold) | Form Storage Area after update |

##### Result

|  | Type | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- |
| permit | bool | ✓ |  |  | Whether to allow Form Storage Area capacity update |

##### Implementation Example


**Lua**
```lua

-- Request
local namespace = args.namespace
local mold = args.mold
local afterMold = args.afterMold

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}
```


#### Asynchronous Execution Script

The script is executed asynchronously after the form storage area capacity update process.

##### Request

| | Type | Description |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | Namespace |
| mold | [Mold](../sdk/#mold) | Form Storage Area |


##### Implementation Example


**Lua**
```lua

-- Request
local namespace = args.namespace
local mold = args.mold

-- Asynchronous scripts typically do not affect the API response.
-- These scripts are typically used for logging, analytics, external notifications, and similar purposes.

result = {
}
```


---
  
### updateForm

Form update

**Related methods:**
setForm - Set form
setFormByUserId - Set form by User ID
setFormWithSignature - Update forms with signed slots


#### Synchronous Execution Script

The script is executed synchronously before the form update process.

##### Request

| | Type | Description |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | Namespace |
| mold | [Mold](../sdk/#mold) | Form Storage Area |
| form | [Form](../sdk/#form) | Form before update |
| afterForm | [Form](../sdk/#form) | Form after update |

##### Result

|  | Type | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- |
| permit | bool | ✓ |  |  | Whether to allow form update |

##### Implementation Example


**Lua**
```lua

-- Request
local namespace = args.namespace
local mold = args.mold
local form = args.form
local afterForm = args.afterForm

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}
```


#### Asynchronous Execution Script

The script is executed asynchronously after the form update process.

##### Request

| | Type | Description |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | Namespace |
| mold | [Mold](../sdk/#mold) | Form Storage Area |
| form | [Form](../sdk/#form) | Form |


##### Implementation Example


**Lua**
```lua

-- Request
local namespace = args.namespace
local mold = args.mold
local form = args.form

-- Asynchronous scripts typically do not affect the API response.
-- These scripts are typically used for logging, analytics, external notifications, and similar purposes.

result = {
}
```


---
  
### updatePropertyForm

Property Form update

**Related methods:**
setPropertyForm - Update Property Form
setPropertyFormByUserId - Update Property Form by User ID
setPropertyFormWithSignature - Update Property Form with signed slots


#### Synchronous Execution Script

The script is executed synchronously before the property form update process.

##### Request

| | Type | Description |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | Namespace |
| propertyForm | [PropertyForm](../sdk/#propertyform) | PropertyForm before update |
| afterPropertyForm | [PropertyForm](../sdk/#propertyform) | PropertyForm after update |

##### Result

|  | Type | Required | Default | Value Limits | Description |
| --- | --- | --- | --- | --- | --- |
| permit | bool | ✓ |  |  | Whether to allow Property Form update |

##### Implementation Example


**Lua**
```lua

-- Request
local namespace = args.namespace
local propertyForm = args.propertyForm
local afterPropertyForm = args.afterPropertyForm

-- Business logic:
local permit = true

-- Result
result = {
  permit=permit
}
```


#### Asynchronous Execution Script

The script is executed asynchronously after the property form update process.

##### Request

| | Type | Description |
| --- | --- | --- |
| namespace | [Namespace](../sdk/#namespace) | Namespace |
| propertyForm | [PropertyForm](../sdk/#propertyform) | PropertyForm |


##### Implementation Example


**Lua**
```lua

-- Request
local namespace = args.namespace
local propertyForm = args.propertyForm

-- Asynchronous scripts typically do not affect the API response.
-- These scripts are typically used for logging, analytics, external notifications, and similar purposes.

result = {
}
```


---
  



