SpinaContactForms
This will add a contact form builder for spina. You can create form elements in the backend that will populate the form in the frontend.
Installation
Add this line to your application's Gemfile:
gem 'spina_contact_forms', git: 'https://github.com/acapro/Spina-Contact-Forms'
And then execute:
$ bundle
Make sure your mail settings are setup correctly.
Add the following to config/secrets.yml
contact_form_from_email: contact_form@yourdomain.com
Add the following to your theme's config file (config/initializers/themes/theme_name.rb)
theme.plugins = ['ContactForm']
Copy and run the migrations
rake spina_contact_forms_engine:install:migrations
rake db:migrate
Usage
In your view, call <%= spina_contact_form%>
That's it! Use Mailcatcher for local development, and test it out.
Contributing
Contributions are welcome! It is still in an early stage, and more features are required. Fork it, and create a pull request.
Roadmap
- Currently only text inputs and text areas are supported, select dropdowns, check boxes and radio buttons still needed
- Internationalization needed
- Create an install generator, which copies the migrations and view files
License
The gem is available as open source under the terms of the MIT License.