• Hello,

    I’m looking for a php code snippet to block specific words in form fields of CF7 so users cannot use these words I block in the contact form.

    Please help
    thank you

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Takayuki Miyoshi

    (@takayukister)

    Thread Starter dragongate

    (@dragongate)

    Hello Takayuki Miyoshi,

    I know about the “Disallowed list” but with this method it will match inside words, so if I put the word “press” it will match also “WordPress” and will block sending the message.

    with php code snippet form field filter, it will match only the word I block means if I chose to block the word “press” it will not block the word “WordPress”.

    can you help on providing a php code snippet which can specify the words that I want to block using form field filer?

    thank you,

    Plugin Author Takayuki Miyoshi

    (@takayukister)

    Try implementing a custom spam filter.

    Thread Starter dragongate

    (@dragongate)

    Hello Takayuki Miyoshi,

    Thank you for your care to reply,

    That’s what I’m looking for actually, but one more thing please, the code you provided will block the custom spam words only in the message “textarea” field, but not for the other fileds of the contact form !

    I mean when I used the code you provided, if a spammer used the spam word in the message “textarea” it will block sending the message but if the spammer used that spam word in other field such as “name”, “Email”, “subject”.. etc. the filter will not detect and the message will be sent !

    Please provide the code that block specific spam words from being used in all fields of the contact form.

    also, how to set an array of many words (not only one word) for the custom spam filter to check and block?

    Thank you,

    • This reply was modified 3 years, 5 months ago by dragongate.
    Thread Starter dragongate

    (@dragongate)

    Hello.. anybody care to reply please?

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘how to block specific words in form fields of CF7 using php code snippet?’ is closed to new replies.