# \
Development The **\** component allows the content in [\](../reference/arkui-js/js-components-basic-input.md) components to be submitted and reset. For details, see [form](../reference/arkui-js/js-components-container-form.md). > **NOTE** > > The APIs of this module are supported since API version 6. ## Creating a \ Component Create a **\** component in the .hml file under **pages/index**. ```html
``` ```css /* xxx.css */ .container { width:100%; height:100%; flex-direction: column; justify-content: center; align-items: center; background-color: #F1F3F5; } ``` ![en-us_image_0000001267887873](figures/en-us_image_0000001267887873.png) ## Zooming In or Out on a Form To implement the zoom effect after a form is clicked, add the **click-effect** attribute to the **\
** component. For values of **click-effect**, see [Universal Attributes](../reference/arkui-js/js-components-common-attributes.md). ```html
``` ## Setting the Form Style Add the **background-color** and **border** attributes. ```css /* xxx.css */ .container { width: 100%; height: 100%; flex-direction: column; align-items: center; justify-content: center; background-color: #F1F3F5; } .formClass{ width: 80%; height: 100px; padding: 10px; border: 1px solid #cccccc; } ``` ![en-us_image_0000001267607913](figures/en-us_image_0000001267607913.gif) ## Adding Response Events To submit or reset a form, add the **submit** and **reset** events. ```html
``` ```css /* index.css */ .container{ width: 100%; height: 100%; flex-direction: column; justify-items: center; align-items: center; background-color: #F1F3F5; } .form{ width: 100%; height: 30%; margin-top: 40%; flex-direction: column; justify-items: center; align-items: center; } ``` ```js // xxx.js import promptAction from '@ohos.promptAction'; export default{ onSubmit(result) { promptAction.showToast({ message: result.value.radioGroup }) }, onReset() { promptAction.showToast({ message: 'Reset All' }) } } ``` ![en-us_image_0000001267767885](figures/en-us_image_0000001267767885.gif) ## Example Scenario Select an option and submit or reset the form data. Create two [\](../reference/arkui-js/js-components-basic-input.md) components, set their **type** attribute to **checkbox** and **radio**, and use the **onsubmit** and **onreset** events of the **\
** component to submit and reset the form data, respectively. ```html
Form
Select 1 or more options
Select 1 option
Text box
Submit Reset
``` ```css /* index.css */ .container { width: 100%; height: 100%; flex-direction:column; align-items:center; background-color:#F1F3F5; } .txt { font-size:33px; font-weight:bold; color:darkgray; } label{ font-size: 20px; } ``` ```js // xxx.js import promptAction from '@ohos.promptAction'; export default { formSubmit() { promptAction.showToast({ message: 'Submitted.' }) }, formReset() { promptAction.showToast({ message: 'Reset.' }) } } ``` ![en-us_image_0000001222967788](figures/en-us_image_0000001222967788.gif)