Jump to:

10851 Posts in 2517 Topics by 1793 members

All other Modules

SilverStripe Forums » All other Modules » MultiForm & Mollom?

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 1086 Views
  • chris_nz
    Avatar
    Community Member
    3 Posts

    MultiForm & Mollom? Link to this post

    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

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: MultiForm & Mollom? Link to this post

    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.

  • chris_nz
    Avatar
    Community Member
    3 Posts

    Re: MultiForm & Mollom? Link to this post

    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.

  • baba-papa
    Avatar
    Community Member
    279 Posts

    Re: MultiForm & Mollom? Link to this post

    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.

    1086 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.