Form Element

GITHUB

To create form control element inside fvForm component, use this component.


Code:

  
HTML
<!-- Normal --> <fvFormElement label="Your Name"> <fvInput /> </fvFormElement> <!-- Single Line --> <fvFormElement label="Your Family" single-line> <fvInput /> </fvFormElement>

Examples:

Enter your country

Enter your country

Notes:

  • You can apply Framevuerk grid classes to this component and parent fvForm.
  • If you want to build your custom form element, inject fvFormElement var (provided by fvFormElement) and call turn(on:Boolean) on focus and blur events of your component to make it compatible with fvFormElement.

API:

NameTypeDefaultDescription
label
String
''
Label of input.
singleLine
Boolean
false
If you want draw label and input element in single line, set this to true.
inline
Boolean
false
If your input element(s) is a non block level (eg fvCheck or fvSwitch) set this to true.
NameDescription
default
---
NameParamsDescription
label
label and highlighted
Label template.