Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

MultiForm & Mollom?


Reply


4 Posts   1205 Views

Avatar
chris_nz

Community Member, 3 Posts

15 April 2009 at 9:13pm

Has anyone got it working, I have got the Multiform module working with 2 steps, and i have the mollom module working (on another form) working correctly so i know both modules seem to be installed correctly.

I cant work out how to get the mollom/spam protection module to update the form. With the following code in my FirstMultiFormStep.php file (mysite/code) I can get it to block spam/ask the user to enter the captcha, but the captcha will never show.

$protector = SpamProtecterManager::update_form($form, 'Message');
if($protecter) $protecter->setFieldMapping('Title', 'Content', 'Name', 'Website', 'Email');

cheers
chris

Avatar
baba-papa

Community Member, 279 Posts

16 April 2009 at 1:27am

Edited: 16/04/2009 1:34am

Have you set up the _config.php correctly?
If you miss the second line your form will always be provided with a captcha, for mollom doesn´t validate any field.

Avatar
chris_nz

Community Member, 3 Posts

16 April 2009 at 12:10pm

I think i have the config correct, what exactly do you mean about the second line?

It works on individual forms, but on multiform if i dont enter any text it will say 'sorry rejected as spam', if i enter some text then it says to enter the captcha, but the captcha wont show - i think because the spamprotection module cannot update the $form.

Avatar
baba-papa

Community Member, 279 Posts

16 April 2009 at 5:57pm

The mollom-Module doesn´t show captchas from the start. It validates the input and then decides weather this is spam or not. In case it is spam suspicious the user gets a captcha. The second line of the code defines the fields that should be validated:
if($protecter) $protecter->setFieldMapping('Title', 'Content', 'Name', 'Website', 'Email');
I´m not a pro, but when I deleted that line I always had a captcha from the start.
Maybe this hint could be of any use for you, for your problem was that you never had any captcha.