Freeform to add custom field to comments module? 
Posted: 07 June 2008 08:11 PM   [ Ignore ]
Newbie
Rank
Total Posts:  2
Joined  2008-06-05

Hello,

I am happy with the way the EE commenting system works except that I need to add one custom field that must be a required field.
I found this post:

http://expressionengine.com/forums/viewthread/80668/

Where freeform is mentioned as a possible alternative.

Am I on the right track to try and use freeform as a replacement to the comments module in EE?

Al I need to do is add one more required field.

Thanks!

Profile
 
 
Posted: 07 June 2008 10:40 PM   [ Ignore ]   [ # 1 ]
Newbie
Rank
Total Posts:  2
Joined  2008-06-05

Ok, so I just added it.

I modified
mod.comment.php

Simply added:

if ($_POST['terms'] == '')
    
{
     $error[]
= $LANG->line('cmt_missing_terms');
    
}

And then went into:
lang.comment.php and added:

"cmt_missing_terms" =>
"Please agree to our terms and conditions by putting your initials in the box, and if this is an emergency please hang up and dial 911.",

to the $L array.

I am sure there is a way to do this with an extension, I’d rather not hack modules.
I have yet to try building one. Would this be possible? If so, which hook would I use?

Thank you very much.

Profile