Giter Site home page Giter Site logo

novaformbuilderbundle's Introduction

Novactive Form Builder

Branch Travis build status
master Build Status

A bundle to create dynamic symfony form.

This bundle aims to provide a lib to help generating dynamic form in a symfony app.

It provides 2 bundles:

  • bundle the symfony bundle
  • ezbundle the bridge to use bundle in eZ Platforn

Note that eZ Platform is a pure symfony app then the bridge is just about wiring the IHM




Installation

Requirements

  • eZ Platform 2+
  • PHP 7.1+
  • MySQL 5.7.8+ / Maria DB 10.1+

Installation steps

Run composer require novactive/formbuilder to install the bundle and its dependencies:

Register the bundles

Activate the bundle in app\AppKernel.php file.

// app\AppKernel.php

public function registerBundles()
{
   ...
   $bundles = array(
        new FrameworkBundle(),
        ...
        // FormBuilder bundles
        new Novactive\Bundle\FormBuilderBundle\FormBuilderBundle(),
        new Novactive\Bundle\eZFormBuilderBundle\NovaeZFormBuilderBundle()
   );
   ...
}

Add routes

_novaezmailing_routes:
    resource: '@NovaeZMailingBundle/Resources/config/routing.yml'

Install the database schema

bin/console novaformbuilder:install

Troubleshooting

If the bundle web assets (css, js etc.) are missing in the public directory it can be fixed by running the following commands:

bin/console assets:install --symlink --relative
bin/console assetic:dump

That will install bundles web assets under a public directory and dump them to the filesystem.

Also if the translations are not loaded at once clearing the Symfony cache folder must help.




Migrate DB from Ez Survey

The database of the old Ez Survey Bundle can be migrated to this Novactive Form Builder Bundle. To do that run the following commands inside ezplatform folder:

php bin/console novaformbuilder:migrate --export
php bin/console novaformbuilder:migrate --import

The first one exports the data from the old database to json files. The second one imports the data from json files to the new database. After that the dumped data is still in the json files inside web/var/site/storage/files/forms folder. They can be removed manually if they are not needed anymore.

What the migration script does is: It takes all surveys to convert them into forms. Each of them is related to particular Ez content. If more than one record have the same content_id the script takes the latest one due to the ID value. Then it takes all questions to convert into fields and results + questions results to convert into submissions.

There is also the option to truncate the current Novactive Form Builder Bundle tables in the database:

php bin/console novaformbuilder:migrate --clean

After running the Migrate scripts you might need to clear the Redis Cache if it's used on the project to apply the changes that have been made to the database.

The migration doen't support the cases if there are more than one ezsurvey fields in any particular Content Type.

To apply the custom Form design on the Front End the bundle template fields/ezcustomform_show_front.html.twig should be overridden with another template inside Ez Platform.




Contributing

Contributing

Change and License

License


Made with <3 by novactive.

novaformbuilderbundle's People

Contributors

maximstrukov avatar plopix avatar m1kheev-max avatar solovevroman avatar ayanduganov avatar erdnaxelaweb avatar d1mich avatar noveodpisarev avatar

Watchers

Leroy Radix Daisy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.