A Vue.js plugin for Symfony ajax form creation

Usage no npm install needed!

<script type="module">
  import vueSymfonyForm from '';



Easy to use AJAX forms written to handle symfony form errors.

Set Up

Enable symfony-form plugin and add connector:

import symfonyForm from 'vue-symfony-form';
import connector from 'vue-symfony-form/src/core/connector';

Vue.use(symfonyForm, {
  connector: connector

Connector is a driver responsible for sending messages. You can replace it with your own.


Create new form with symfony-form component with required action attribute.
Following code will send simple GET request to action url:

<symfony-form action="/foo">
  <input type="text" name="name" />
  <input type="email" name="email" />

When form will be proceeded you'll get appropriate errors above fields in case your form data isn't valid.

That's all.


Action procceeded before data will be sent.
Action in case of success status
Action in case of invalid data
Action procceeded when request completely sent


Request method ('GET' by default)
Class which will be performed to error divs
Set unify data prefix for input fields. [dataPrefix][name]
Just a flag to use in connector. You can modify connector and set extra headers for authorized requests


Use it to modify default error message in case of request was failed

Look usage examples in examples directory