Modify Form Rules
This guide explains how to modify form generation rules through the form API, including appending rules at the end of form rules, prepending rules, adding child components, and deleting components.
Note
Regardless of which method is used, what is ultimately modified is the component's rule data source. You must wrap rule with ref to maintain data reactivity.
Append Rules at the End of Form
Use the append method of the form API to dynamically append new form components at the end of the form or at the bottom of specified components.
Prepend Rules at the Beginning of Form
Use the prepend method of the form API to dynamically insert new form components at the top of the form or before specified components.
Add Child Components to Components
Use the append method of the form API to dynamically add child components or slot content inside specified container components.
Delete Form Components
Three methods are provided for deleting form components: directly modifying the rules array, deleting through the field field, and deleting through the name field, providing flexible form component management.


