contact form feature request

Creating and modifying plugins.
Post Reply
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

contact form feature request

Post by carl_galloway »

Is it possible to update the contact form to allow users to add fields and select fields that are required?

The first is probably quite difficult to implement, but I have seen something similar in another open source application (OpenRealty, a property listing script that allows dynamic field creation and editing)

The second, well our comment form has this already so this shouldn't be too difficult should it?

Thanks, Carl
judebert
Regular
Posts: 2478
Joined: Sat Oct 15, 2005 6:57 am
Location: Orlando, FL
Contact:

Post by judebert »

Didn't we recently cover this for a guy who wanted to use the contact form as an order form? Yup: http://www.s9y.org/forums/viewtopic.php ... ntact+form.

Unfortunately, it involves editing the .tpl. I'll bet you'd like it a bit more automatic than that, hmmm?
Judebert
---
Website | Wishlist | PayPal
carl_galloway
Regular
Posts: 1331
Joined: Sun Dec 04, 2005 5:43 pm
Location: Andalucia, Spain
Contact:

Post by carl_galloway »

yes, exactly, but it's not as simple as editing the .tpl, the event file also needs to be edited.

The contact form plugin must have name, email, and url, but the contact form I changed for another user needed firstname and lastname, and a radio box for mr, miss or mrs, which in german was reduced to just herr and frau, also it did not require the url. In addition to the .tpl file I also had to change the following functions;

function sendComment
function checkSubmit
function show

I struggled with the event file (I'm not strong in php) and even though I eventually got it working perfectly, I think changing this plugin would be way beyond the ability of most users.

Some sort of dynamic field editing would make it more usable. Jude, if you're interested in taking up the challenge I could send you the zipfile of the changed contact form so you can see exactly what needed to be done.

Carl
Post Reply