Page 1 of 1

contact form feature request

Posted: Sat Oct 14, 2006 9:45 pm
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

Posted: Mon Oct 16, 2006 8:30 pm
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?

Posted: Tue Oct 17, 2006 6:48 pm
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