2.1.4 • Published 5 years ago

sling-web-component-form v2.1.4

Weekly downloads
153
License
-
Repository
-
Last release
5 years ago

sling-web-component-form

Install

npm install sling-web-component-form

Tag

  <sling-form></sling-form>

Dependencies

Required

  • sling-framework
  • sling-helpers

Recommended

  • sling-web-component-button
  • sling-web-component-input

Attributes and properties

NameTypeDefault ValuesReflectToAttributeObservercallSdk
formdataObjectfalse:x::heavy_check_mark:
validationArray[]:x::x:

Description

NameDescription
formdataObject that contains the data from the form
validationA list of sling-helper methods for validations

Events

  • formsubmit Description: Event triggered every time that the form is submitted.

  • update Description: Event triggered when any value of the form is changed.

Use

Use it like you are using a <form> tag. You can put anything form-related inside of it.

<sling-form>
 <sling-input name="name" type="text" label="Name"></sling-input>
 <!-- ... -->
</sling-form>      

Examples

All component examples can be emulated using the npm start sling-web-component-form command.