Skip to main content

Form

info

For more details about Vuetify’s usage of Form component, click Form page.
For more prop explanations, click Vuetify Form API page.

Props

AttributeDescriptionTypeDefault
actionDefines 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.stringundefined
disabledPuts all children inputs into a disabled state.booleanfalse
methodSpecifies how to send form-data (the form-data is sent to the page specified in the action prop).stringundefined
validationIf enabled, value will always be true unless there are visible validation errors. You can still call validate() to manually trigger validation.booleanfalse
valueA boolean value representing the validity of the form.booleanfalse
visibleVisibility of Footer component.booleantrue

Events

AttributeDescription
inputThe 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

Samples Component

image

Form