This module is working, but in a very alpha version. Using is at your own risk! You are welcome to work on it
Prerequisites
Installation
Permission
Usage
Notice
Troubleshoot
Todo
Due the package ist based on several prerequisites, you need follow the following steps:
- Install Pingponglabs Shortcode Package
- Install Formbuilder
- Add middleware
Please follow the installation instructions below step by step.
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
Due Pingponglabs changed the parse logic in the newest version, an incompatibility in some cases could occure.
That's why we will fix the version to 2.1.
Please add this to your composer.json file:
"pingpong/shortcode": "2.1",
Next, open a terminal and run.
composer update
After the composer updated. Add new service provider in config/app.php.
'Pingpong\Shortcode\ShortcodeServiceProvider'
Add new Facade alias.
'Shortcode' => 'Pingpong\Shortcode\ShortcodeFacade',
Done.
Now you can install the Formbuilder Please add this to your composer.json file:
"stonelab/formbuilder": "~1.0"
and run composer update again.
That's it.
To make it work, you need to add a middleware to the Page Module.
If you not already have it, create a file asgard.page.config.middleware.php
under confid folder.
The content should look like:
<?php
return [
'Modules\Formbuilder\Http\Middleware\FormbuilderMiddleware'
];
Notice: This feature was newly added to the page module. Make sure you got the latest version
Don't forget to set the Permissions for the newly added Formbuilder module.
You can mangage your forms in backend under the Formbuilder seciton. While you're creating your form, pleas make sure you filled out all necessary datas on all section and languages (specially mail section), esle you will lose your created form when you try to save and you need to do it again. this will be solved in future release. For every you form you've created you'll get an form id which you can you use through the shortcode.
The shortcode looks like:
[form id=1]
you can put this shortcode wherevery you want in the an page content.
All submitted forms are automatically stored and you can see it in the backend.
At the moment, the output are Bootstrapped Fields and Wrappers. This will be changed in the future.
Error: Shortcode not found
You need first setup the Shortcode package. When this error appears, it means you not have added the alias under config/app.php.
Form could not be sent
Please check you mail driver under config/mail.php
When it's set up correctly, then check if you have set up valid mail addresses your form mail settings.
Fix losing data when not filled out all necessary datas due saving. Make Layout more flexible