Hi there,
This is a patch I wrote to enable embedding the system-wide contact form. In my case, users are contacting the site owner about properties that they see, so the system contact form is needed. Also, the Contact Field module only works with that one.
This patch adds a new option to the administration page (the first one in the General section). It lets you select whether you want to see the user's form (well, I called it Administrator's contact form...should probably be changed...) or the System-wide contact form.
I modified contact_form_on_node.module to support this and made sure the old functionality still worked.
My form doesn't give a "you must be connected" message though if they don't have access. It simply doesn't display the form - I think this should be the way to do it for the other type too, but I didn't want to change too much.
Also notice that I use the proper contact_site_form function rather than a direct call to drupal_get_form.
It's my first patch, so it's probably got issues, but if you see this let me know what you think! Hopefully it makes it in.
Thanks,
Kevin
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | contact_form_on_node_841182_system_form_2.patch | 5.4 KB | wizonesolutions |
| contact_form_on_node_system_form_1.patch | 5.87 KB | wizonesolutions |
Comments
Comment #1
tahiticlic commentedThanks for this! I let people review it before to release a new version.
Comment #2
wizonesolutionsWow, thanks for the quick reply cfab. Much appreciated and looking forward to it getting reviewed.
Comment #3
wizonesolutionsHey, here's an updated version. My version had a bug; it did not respect the content types properly because I didn't get the variable's value before using it.
Note that it also has some improvements (but not complete) to the code syntax. I just tend to do that sometimes as I go through code...so I left it in :)
Comment #4
tahiticlic commentedIt's patched on D6-1.6
But I've a really strange behavior, rendering contact_mail_page form redirect to contact page. Could someone confirm this behavior?