Form
info
Props
Attribute | Description | Type | Default |
---|---|---|---|
action | Defines the action to be performed when the form is submitted. Usually, the form data is sent to a file on the server when the user clicks on the submit button. | string | undefined |
disabled | Puts all children inputs into a disabled state. | boolean | false |
method | Specifies how to send form-data (the form-data is sent to the page specified in the action prop). | string | undefined |
validation | If enabled, value will always be true unless there are visible validation errors. You can still call validate() to manually trigger validation. | boolean | false |
value | A boolean value representing the validity of the form. | boolean | false |
visible | Visibility of Footer component. | boolean | true |
Events
Attribute | Description |
---|---|
input | The updated bound model |
How to POST Data With Form Action?
To POST data with form action, you can use Form component.
- Define the Form component method prop as 'post'.
- Define the Form component action prop. The action needs to be the URL which will be send the form data to.
- For the form data to be sent with the form, add the VTextField component inside the Form component.
- Define VTextField component visible prop as false.
- Define VTextField component type prop as 'hidden'.
- Define VTextField component name prop which applies the name attribute to the html input element. The name prop can be used to target a form submission.
- Define the value to be sent with the form to the VTextField component's qValue prop.
- For the form submission, add the VBtn component inside the Form component.
- Define VBtn component type prop as 'submit'.
Example: POST_Form_Action