I always seem to default to fall back path.

Dig1 - May 13, 2008 - 10:44
Project:Contact Forms
Version:6.x-1.4
Component:Miscellaneous
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed
Description

I am on the Drupal Learning Curve. I have installed 6.2 and would like to use the Contact_Forms Module so that visitors can easily see on one page the different ways of contacting my Cricket Club e.g.

This is what I did to install:
- Installed Drupal 6.2
- Enabled core contact module
- reset contact menu item to default
- enabled and expanded contact in navigation
- copied contact_forms-6.x-1.1 to sites/all/modules
- enables contact_forms module

This is what I could not do:
- http://drupal.org/project/contact_forms states WARNING: Please make sure that you disable, uninstall and delete the contact_list module folder before installing this module.
I cannot find a contact_list module folder to disable, uninstall and delete.

This is what I did to configure:
- Contact Form Settings talks about Contact !category as The title you would like displayed on the contact page. To place the category name in the title use the wildcard "!category".
I left it as:
Contact Form Title: Contact !category
Contact Form redirect: contact
Default Contact Form Additional information: You can leave a message using the contact form below.
Contact Forms Additional information: You can send !category a message using the contact form below.
- I created two categories (Membership and Captain) with two recipients respectively.

This is what happens:
- I click on Contact and get exactly the same as I did with the core contact module.

This is when I get confused:
1) Do I need to manually create a page that will be referenced?
2) http://drupal.org/node/187234 states that The path 'contact/{category}' generates a contact form for that category with a title = 'contact {category}'. If a path is entered that does not have a category you can specify a page to redirect to. The default fall back path is contact.

It appears that the fall back path is constantly being used...I am probably doing something stupid...what am I missing?

Thanks in advance for your help

Digby

#1

behindthepage - May 13, 2008 - 15:43

My apologies if the readme file is not clear enough. After spending hours writting the code I find it difficult to write instructions for the uninitiated.

The path /contact will take you to the standard site wide contact form (with the drop down menu)
the path /contact/Membership will take you to a form without the drop down menu and with the title of "Contact Membership"
the path /contact/Captain will take you to a form without the drop down menu and with the title of "Contact Captain"

To have a fall back page different to the standard site wide contact form you need to create a page and put on that page the links /contact/Membership and /contact/Captain. Then set that page as the Contact Form redirect

Lets have a look at a real example
http://www.myacpl.org/contact/us

Here they have created a page and added an url alias of 'contact/us' and on that page put some info and a link to the unique forms. They would then set 'contact/us' as the Contact Form redirect. I personally would not use a path like "contact/us" but something like 'directory' or 'contacts' however as long as they don't add a category named 'us' they shouldn't have any problems.

You could also have links in your menu to the two forms by creating menu items and using the paths contact/Membership and contact/Captain and disabling the menu item for 'contact'

The contact_list module was the forerunner of the contact_forms module and would only exist if you had upgraded from version 4.7 or 5. I need to go over version 6 again and fix up all those little mistakes.

I hope this makes it clearer. If not post again.
Regards
Geoff

#2

Dig1 - July 14, 2008 - 11:19

Geoff

Thanks for coming back to me. Great Explanation. I'll look into this.

All the best

Digby

#3

behindthepage - November 30, 2008 - 21:56
Status:active» closed

#4

agentrickard - December 16, 2008 - 21:07
Version:6.x-1.1» 6.x-1.4
Category:support request» bug report
Status:closed» active

The issue came up for me and turns out to be what I would call an odd design choice.

The module assumes that all Contact Categories are named with human-readable names (e.g. Contact Us instead of contact_us).

As a result, you cannot access forms that have underscores in the name, as the database and menu handling breaks the name string.

#5

behindthepage - January 1, 2009 - 04:46

Hi Ken,

2 or 3 years ago when I first wrote Contact lists and forms, which was the precursor to Contact forms, I was paranoid about having spaces in urls so I replaced them with underscores. I never thought than anyone would want to use underscores in the category names.

Since then my knowledge has grown and I realise the underscores are unneccessary however if I took them out it would break over 1500 sites that use the Contact Forms module. There is a patch to add this modules features to core version 7 here http://drupal.org/node/183678 if you want to get involved and underscores have been discussed and discarded.

You can very easily remove the underscore code and I suspect you may have already done that.

Regards
Geoff

#6

agentrickard - January 1, 2009 - 18:41

Yes, I did, and may whip up a patch or two for it.

#7

behindthepage - January 15, 2009 - 19:16

I don't feel that I can remove the underscore completely as there are over 1500 sites out there using this module. And while no one has sent me money I feel some obligation not to break their sites. (Or maybe I could hold them to ransom - send money or else!)
However I could add a feature where you have the choice whether to replace spaces with underscores or even chose what character to use. Maybe a select -> underscore, dash or nothing.

What do you think?
Geoff

#8

agentrickard - January 15, 2009 - 21:09

What I did was to separate the Page Title from the category, where the category was assumed to be database-safe (with underscores) and the Page Title human-readable.

Page Title is stored in the Contact Forms table, category in the standard {contact} table.

#9

behindthepage - October 2, 2009 - 19:54
Status:active» closed
 
 

Drupal is a registered trademark of Dries Buytaert.