Frage

I am using rails 3.2.8 and I have created a contact form from this tutorial:

http://matharvard.ca/posts/2011/aug/22/contact-form-in-rails-3/

Now I have this form inside a colorbox using

# Colorbox
gem 'colorbox-rails', '~> 0.0.9'

If I have this colorbox on several pages, how do I get it to also send with the customer info the page they were on when they filled it out?

Any help would be appreciated! If you need more info don't hesitate.

War es hilfreich?

Lösung

All that had to be done is in the contact controller add a line inside the create

@message.submitted_on_page = request.env['HTTP_REFERER']

before you deliver your messages

Andere Tipps

A very simple way to add contact form to your webApp or site is to install Dropifi Contact Widget (http://www.dropifi.com). They provide the solution you are looking for.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top