Download the PHP package neri4488/laravel-form-builder without Composer
On this page you can find all versions of the php package neri4488/laravel-form-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download neri4488/laravel-form-builder
More information about neri4488/laravel-form-builder
Files in neri4488/laravel-form-builder
Package laravel-form-builder
Short Description Laravel Package for Creating a Drag-and-Drop Form Builder Using JQuery Form Builder
License
Informations about the package laravel-form-builder
Laravel Form Builder Package
A Laravel package for creating a drag-and-drop form builder using the JQuery Form Builder.
Screenshot:
The forms fields are saved as json and stored in your database. A member of your site can create, edit and delete forms. Forms belong to the users that created them and each form has a unique link that can be shared publicly.
The json version of the form can be used to render the form for users to fill.
Example Json Form:
Form permission options
- Public - anyone can submit the form without needing to login
- Private - only authenticated members of your site can access the form. Provide the option for users to edit their previous submissions.
Requirements
- Laravel 5.7
- MySQL
- Laravel Authentication - php artisan make:auth
If you are looking for a managed web host, with easy laravel site creation, then I highly recommend Cloudways. Cloudways will setup a laravel site and mysql database in minutes.
Dependencies Included with Package
- jQuery UI - User interface actions built on jQuery. View jQuery ui Documentation
- jQuery Formbuilder - Drag and drop full-featured form editing. View jQuery Formbuilder Documentation
- clipboard.js - Copy text to clipboard. View Clipboard Documentation
- parsley.js - JavaScript form validation library. View Parsley Documentation
- moment.js - Parse, validate, manipulate, and display dates and times in JavaScript. View Moment Documentation
- footable - A responsive table plugin built on jQuery and made for Bootstrap. View FooTable Documentation
- sweetalert - A beautiful replacement for site error/warning/confirmation messages. View SweetAlert Documentation
Installation Instructions
This custom package takes a couple steps to install but I will try to make it as simple as possible.
Step One:
Edit your composer.json file manually or simply type
Step Two:
Ensure you have all your dependencies installed
Note: The package will automatically register itself using Laravel's package discovery feature for versions 5.6 and above. This means you do not need to update your config/app.php file.
Step Three:
We need to add the additional database tables so run the following command
Step Four:
Create the form package's configuration file. This will place a formbuilder.php file in your config folder. In the configuration file you can change the url path for the package's routes, layout template to use and script / style output sections.
Run the following command:
Step Five:
Update your blade template file. In the default laravel install the template file is located here: /resources/views/layouts/app.blade.php
You need to add tags for the new styles and scripts At the top of the blade file, just above the closing head tag:
At the bottom of the blade file, just above the closing the closing body tag:
Note: If you ever need to change which files are called using these @stack values, you can update the config file.
Step Six:
Publish the custom blade view files by running
Publish the public assets by running
Or you can publish everything at once with
Step Seven:
In order to properly link to attachments, you need to run the storage:link command which makes the storage folder publicly accessibly
Accessing The Application
Ta Da! You did it! Now to access the form application. http://your.domain.com/form-builder/forms
To view submissions: http://your.domain.com/form-builder/my-submissions
Using The Trait
You can access forms and submissions that belong to a user in your application. To use the trait add a use statement to your user model class.
You can now access the user's forms and submissions by running
Using Events
The package dispatches a number of events when records are created or updated so that you can listen to these events and perform custom tasks in your application's logic
Precautions
- Make sure you have a table name users with a colum id {bigSignedInteger} in your database.
- Once you have submission(s) on a form , dont attempt to edit the form again bacause it will break the display of earlier submissions 3.
Acknowledgments
This repo was forked from: https://github.com/jazmy/laravel-formbuilder She did the hardest part of the library.