First things first ... great module!!

I have set up my contact forms and they work great. I have one form that is referenced from several different sections of my site and while I would like all the emails to go to the same place regardless of what page they were referred by, I would like to change the subject.

Is there a way to auto-populate the subject field when the user clicks on the the link which brings them to the contact form?

right now I have: contact/course+inquiry to launch the contact form for course inquiry, which allows the user to type in a subject. I'd like to put my own subject in there if possible.

Thanks for any help!!!

Mike

CommentFileSizeAuthor
#1 contact_forms.txt4.84 KBbehindthepage
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

behindthepage’s picture

FileSize
4.84 KB

Hi Mike,

Glad you like it and have found it useful.

There isn't a way of defining a subject although just thinking about it it shouldn't be too hard to do.

Time passing....
No it wasn't hard to do.
Use the attached module. (rename it as .module) See how it goes.
Paths are now like this
contact/course_inquiry/Put_the_Subject_here

Note the underscores instead of spaces.

Regards
Geoff

behindthepage’s picture

Hi Mike,

I have committed these changes to version 6.x-1.3

Regards
Geoff

isthisthingon’s picture

Status: Active » Closed (fixed)

works great, thank you!!!

scurvy’s picture

Thanks for this module. It's a great innovation, although there is an error which is rendering it unusable for me. I just started using this module, but I think this might be related to the feature you just added.

When I use the contact form, the subject field is completely ignored. The subject of the message always uses the URL parameter.

For example, if I submit the form on "contact/General_Info/Information_Request", the editable subject field appears in the form, with the default value "Information Request". However, even if I modify that default value and submit the form, "Information Request" appears as the subject in the e-mail received.

That would be fine, if the Subject field were removed or disabled. But as it is, the user has every reason to believe that his altered subject line went through.

This is true even if there is no subject parameter. For example, if I submit the form on "contact/General_Info", the subject field is empty. If I enter a subject and submit the form, the message received has no subject (other than the [General Info] tag).

behindthepage’s picture

Version: 6.x-1.1 » 6.x-1.3
Component: User interface » Code
Assigned: Unassigned » behindthepage
Category: support » bug
Priority: Normal » Critical
Status: Closed (fixed) » Fixed

My apologises. I used '#value' (which is hard coded) instead of '#default_value' (which can be changed) in the forms code. Well spotted Scurvy. I have changed it and re- released it.

My apologisies again.
Regards
Geoff

ridefree’s picture

is this available for 5.x ? been trying to get it to auto create the subject but no luck yet.

does it have to be in the form word_word_word ?

thnx

behindthepage’s picture

Version: 6.x-1.3 » 5.x-1.13
Category: bug » feature

I have just added the feature to ver 5 now.

Regards
Geoff

behindthepage’s picture

Status: Fixed » Closed (fixed)
bineeshtvr’s picture

Hi could u make it the auto selection of subject as the post heading ? Thanks

behindthepage’s picture

Sorry. I don't understand what you mean.
Regards
Geoff