aura

Form

The Form component is a form element wrapper. It simply places a form element around its children. and includes the csrf token in the form.

Attributes

  • action (String): The URL to submit the form to.
  • method (String): The HTTP method to use when submitting the form. Defaults to POST.
  • files (Boolean): If present, the form will accept file uploads.

Basic Usage

Copy to clipboard

<aura:form action="/submit">
    <-- form elements go here -->
</aura:form>

File Upload

Copy to clipboard

<aura:form action="/submit" files>
    <-- form elements go here -->
</aura:form>