WP-Post Contract Form
Updated to version 0.2 – Please download again.
Well, I’ve written my second WordPress Plugin. Well – Not really. This was more of a hack…
See Ryan Duff has a plugin that allows a person to dynamically insert contact forms into any post or page. And Podz needed a version of it that he was customized for a free WordPress installation project that’s being created. He’s got a prototype running but he wanted a unique key to be generated for each user.
You can see the request on the WP Hackers archive.
The download of my plug in is here: here.
Things I’ve changed:
0.2 REQUIRED UPDATE
Fixed the MD5. The website was not being included in the hash…
It now uses $wpcontract_website instead of email too. Then the same email contact can be used for multiple websites.
Removed the CSS styles that were incompatible with my theme (and probably others). The are renamed and can be put back in easily.
Added carraige returns to the email where needed.
Made the whole thing WC3 compliant:
http://validator.w3.org/check?uri=http%3A%2F%2Fwww.thecodecave.com%2F%3Fp%3D133&charset=%28detect+automatically%29&doctype=Inline
0.1 Initial version
Automatically sends the email to the destination AND the user, reversing the From and To.
Required the website to be filled in.
Added a terms field that is customizable.
Added a customizable “I agree” line
Added a checkbox and verified it is filled out in the end.
I did not bother creating a legit POT file for language localization
Generated a unique ID for the contract.
Here’s a live demo of the result. I’ve since begun to wonder if the CSS alignment is specific to my blog as other blogs did not seem to have the alignment issues with the original plug in that I did. Well that’s easily fixed in anycase.
Excellent. I am contract ID: 646658f20e97ca1
Not (required) so no contract made, despite my contract ID of 646658f20e97ca1
Nothing a fragment of can’t cure. Same contract ID despite being on a different computer. I smell hash and it looks like me 🙂
Thanks Paul!
My MD5 had an error. Version 0.2 is now releaed.
It’s had a number of small cleanups done to it…
No worries. You change, I play! My contract ID this time is d972445964.
Once more from my Windows machine, contract ID is same d972445964.
But did you use the same Website? The MD5 is based upon the Website you specify and a hidden key provided by the blog owner. If you, the contractee, provide a different website, you’ll get a different key…
OK, Fixed the check box check and did some further testing.
The incomplete data check changed between version 1.1 and 1.4 of WP-Contact and I hadn’t noticed. I’d originally based this plugin in the 1.1 version WP-Contact-Form which is available from the Plugins database. However, that version does not work with WordPress 2.0. At least it didn’t work for me.
When I transferred this stuff over to the new version downloaded from Ryan’s site, I missed some steps along the way. Anyway, It seems to be fully functional now..