
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
ionic-vue-form
Advanced tools
Render fully customizable dynamic form with form-field conditional logic.
npm install ionic-vue-form
// Register globally (optional)
import { IonicVueForm } from "ionic-vue-form"
Vue.component("IonicVueForm",IonicVueForm)
// Register locally (optional)
<script>
import { IonicVueForm } from 'ionic-vue-form'
export default {
components: {
IonicVueForm
}
}
<script>
<template>
<div>
<IonicVueForm :formFields="form" btnText="Submit" @submit="submit" />
</div>
</template>
<script>
import { IonicVueForm } from 'ionic-vue-form'
export default {
components: {
IonicVueForm
},
data () {
return {
form: [
{
key: "email",
label: "Email"
},
{
key: "password",
label: "Password
}
]
}
},
methods: {
submit(data) {
// Submit logic
// data - Form input(s)
}
}
}
</script>
In your project's main.js import and use vee-validate
import VeeValidate from 'vee-validate'
Vue.use(VeeValidate)
data prop takes the data object, binds each key-value pair to the relavent form field
<template>
<div>
<IonicVueForm :formFields="form" :data="formData" btnText="Submit" @submit="submit" />
</div>
</template>
<script>
import { IonicVueForm } from 'ionic-vue-form'
export default {
components: { IonicVueForm },
data () {
return {
form: [
{
key: "first_name",
label: "First name"
},
{
key: "last_name",
label: "Last name
}
],
formData: {
first_name: "John",
last_name: "Doe"
}
}
},
methods: {
submit(data) {
// Submit logic
// data - Form input(s)
}
}
}
</script>
| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| formFields | Array | true | - | List of fields to render |
| data | Object | false | - | Form datta (if you need to auto-fill the form) |
| btnText | String | false | Continue | Submit button text |
| wrapperClass | String | false | - | Form wrapper class |
| Event | Description | Parameters |
|---|---|---|
| submit | Submit form | - |
| fileUpload | Useful when you want to handle file processing separately | - |
required | String Must be unique, the key will be used in formData.optional | String Input type, defaults to text.optional | String Input field's labeloptional | String Field validation rules, Ionic vue form uses VeeValidateoptional | String Input CSS classoptional | Integer rows attribute for textarea inputoptional | Integer cols attribute for textarea inputrequired | Array List of option values for select dropdownoptional | Object
Show number field if email value is a@b.com{
key: "email",
label: "Email",
},
{
key: "number",
type: "number",
label: "Number",
condition: {
key: "email",
value: "a@b.com"
}
}
required if type is component. If the component requires props you can use props property which takes an objectThis is useful when you want to use a 3rd party component in your form. In the example below, I want to use vue-multiselect in my form.
<script>
import multiselect from "vue-multiselect";
export default {
data() {
form: [
{
key: "category",
label: "Select Category",
type: "component",
component: multiselect,
props: {
options: [],
multiple: true,
closeOnSelect: false,
clearOnSelect: false,
hideSelected: true,
preserveSearch: true,
trackBy: "category_label",
label: "category_label"
}
}
]
}
}

FAQs
Dynamic form render
The npm package ionic-vue-form receives a total of 8 weekly downloads. As such, ionic-vue-form popularity was classified as not popular.
We found that ionic-vue-form demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.