[ckan-dev] Best way to add a contact form

Stéphane Guidoin stephane at opennorth.ca
Tue Feb 18 16:16:51 UTC 2014


Except if I'm wrong, there is not easy way to do it since an extension like
CKAN-page does not really let you create pages with a form.

You have no other choice than creating an extension that implement iRouter
and then define a controller and the corresponding templates.

The good news, if you are willing to do it, is that I did something like
that few days ago :
https://github.com/CityofSurrey/ckanext-surrey/blob/master/ckanext/surrey/plugin.pyalso
look at controller.py and the contact template.

(It's on CKAN 2.2, but it should be the same)


On Tue, Feb 18, 2014 at 11:11 AM, James Bell <james at james-bell.co.uk> wrote:

> Hi
>
> I'm new to Ckan and python and I am trying to add a generic 'contact us'
> form to my ckan homepage. It's a really simple form that collects; name,
> email, comment and then emails this to specified email address.
>
> What's the best of achieving this in CKAN as I can't find any docs for
> this?
>
> I'm running version 2.1.1
>
> Thanks,
> ...
>
> This year I am running the London and Yorkshire marathons.
>
> [image: JustGiving - Sponsor me now!]<http://www.justgiving.com/jamesryanbell>
>
> To sponsor me for these and various others runs throughout this year and
> last please go visit: http://justgiving.com/jamesryanbell
>
> All money raised will go to Diabetes UK
>
> Thanks
>
> :-)
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20140218/14671ee9/attachment-0003.html>


More information about the ckan-dev mailing list