Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/victoire/widgetformbundle
Create custom forms in Victoire website
https://github.com/victoire/widgetformbundle
cms-extension form fov friendsofvictoire php victoire widget
Last synced: about 2 months ago
JSON representation
Create custom forms in Victoire website
- Host: GitHub
- URL: https://github.com/victoire/widgetformbundle
- Owner: Victoire
- Created: 2015-04-14T21:35:21.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2018-08-13T14:44:00.000Z (over 6 years ago)
- Last Synced: 2024-04-15T04:19:22.940Z (9 months ago)
- Topics: cms-extension, form, fov, friendsofvictoire, php, victoire, widget
- Language: PHP
- Size: 219 KB
- Stars: 4
- Watchers: 15
- Forks: 8
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
[![CircleCI](https://circleci.com/gh/Victoire/WidgetFormBundle.svg?style=shield)](https://circleci.com/gh/Victoire/WidgetFormBundle)
Victoire Form Bundle
============## What is the purpose of this bundle
This bundle gives you access to the *Form Widget*.
With this widget, you can install any contact form.## Set Up Victoire
If you haven't already, you can follow the steps to set up Victoire *[here](https://github.com/Victoire/victoire/blob/master/doc/setup.md)*
## Install the Bundle :
Run the following composer command :
php composer.phar require victoire/form-widget
Do not forget to add the bundle in your AppKernel!
class AppKernel extends Kernel
{
public function registerBundles()
{
$bundles = array(
...
new Victoire\Widget\FormBundle\VictoireWidgetFormBundle(),
new Ivory\CKEditorBundle\IvoryCKEditorBundle(),
);return $bundles;
}
}## Inject Data before send mail
When widget is configure to send mail with form data, you can inject some other data before send mail.
### Create a EventLister :
prependData('new label', 'before post data');
$event->appendData('another label', 'after post data');
}
}### Declare listener in Service :
#service.yml
widget_form_listener:
class: AppBundle\EventListener\WidgetFormListener
tags:
- { name: kernel.event_listener, event: victoire.widget_form.pre_send_mail, method: injectData }## Use reCAPTCHA
[ReCAPTCHA](https://developers.google.com/recaptcha/) is a free CAPTCHA service that protects websites from spam and abuse.
### Parameters
To use reCAPTCHA on your website, you'll need to :
* Register your website in the [reCAPTCHA homepage here](https://www.google.com/recaptcha/intro/android.html)
* Add your api keys in your app parameters```yaml
victoire_widget_form.recaptcha_public_key: XXXXXX
victoire_widget_form.recaptcha_private_key: XXXXXX
```