Hi!
I'm not exactly proficient in Drupal's API, but I would like to add something onto the Contact module for my site (and if it works well, submit it for the next Drupal release) that allows the category to be preselected for the user via an argument passed from the URL.
So, like, mysite.com/contact/feedback would bring up the Contact form with the Feedback category already selected for the user. I don't want it to be locked as the Feedback category--the dropdown box should still be there--but Feedback should be preselected.
Could anyone point me in the right direction of how I would achieve this? I'm thinking the best way to do this would be to create a machine-readable name for the category and then have the argument go against the machine-readable names, sorta like the content-type module... but again, I'm not a Drupal programmer :p
Again, if anyone could point me in the right direction as to how to do this, I'd be very appreciative.
Thanks again.
Comments
The contact category is
The contact category is selected by an integer value (the machine readable form if you like). So you can hook the form and set the default category based on this value. You can then create path aliases for your friendly urls. Example: alias contact/feedback to contact/2
Create a custom module (or whatever you want to call it) and add the following code :
No problem
The Contact List module does this.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
Ah!
That does basically just what I wanted. Thanks very much!
Works great
I use it on several sites. I nominated it for Drupal 6 core but was ignored.
Nancy W.
Drupal Cookbook (for New Drupallers)
Adding Hidden Design or How To notes in your database
NancyDru
solution
contact_list seems to have gone, but advcontact looks to be the current solution
http://drupal.org/node/228823#comment-770034