A Formbuilder to create and manage your forms and submissions
This Formbuilder module allows you to easily drag and drop your form together.
It automaticaly stores all submissions of your forms included your created fields.
You can duplicate your form to other languages and generate the form HTML code to edit it.
This module is working, but in a very alpha version. Using is at your own risk! You are welcome to work on it
To display the forms in the frontend, it requires the Shortcode Module of Pingpong Sky Labs:
http://sky.pingpong-labs.com/docs/2.0/shortcode
For captcha image, we use the package from Drew Phillips https://www.phpcaptcha.org/
Please add this to your composer.json file:
"dapphp/securimage": "~3.5"
Link to GitHub: https://github.com/dapphp/securimage
To make it work, you need to add a middleware to the Page Module.
Add a file PageMiddleware.php inside Modules/Page/Http/Middleware
Put follwing content into it:
<?php
namespace Modules\Page\Http\Middleware;
use Closure;
use Shortcode;
class PageMiddleware
{
/**
* Run the request filter.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @return mixed
*/
public function handle($request, Closure $next)
{
$response = $next($request);
$response->setContent(Shortcode::compile($response->original));
return $response;
}
}
Adjust the routes in Modules/Page/Http/frontendRoutes.php to
$router->get('{uri}', ['middleware'=>'page','uses' => 'PublicController@uri', 'as' => 'page']);
$router->get('/', ['middleware'=>'page','uses' => 'PublicController@homepage', 'as' => 'homepage']);
And add to app/Http/Kernel.php to $routeMiddleware
'page' => 'Modules\Page\Http\Middleware\PageMiddleware',
That's it.
Don't forget to set the Permissions.
At the moment, the output are Bootstrapped Fields and Wrappers. This will be changed in the future.
Make Layout more flexible
Install any module with the php artisan asgard:download:module
command.
php artisan asgard:download:module stonelab/formbuilder --migrations
This will download the module and run its migrations.
composer require stonelab/formbuilder
This is if the module is perfect for your use-case as-is, and doesn't need any changes to fit your needs.
Note: Don't forget to give yourself the required permissions before you can view the backend entries.