Issue #6 resolved

Form needs a prepopulate by GET arguments

Anonymous created an issue

It would be handy to be able to use some get parameters to prepopulate the form. Something like /contact_form/?email=joe@example.com&subject=Inquiry prepopulating the email and subject fields would be nice.

Perhaps a change to forms.py something like this would be reasonable:

{{{

!diff

136a137,138

    if not kwargs.has_key('initial'):
                  kwargs['initial'] = request.GET

}}}

Or even:

{{{

!diff

136a137,138

    if getattr(settings, 'CONTACT_FORM_PREPOPULATE_GET', False) and not kwargs.has_key('initial'):
                  kwargs['initial'] = request.GET

}}}

It is easy to override the form, but adding this functionality in the inluded form would save some hassle.

Comments (1)

  1. Log in to comment