Needs review
Project:
BOTCHA Spam Prevention
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
11 Dec 2012 at 08:57 UTC
Updated:
13 Nov 2015 at 13:09 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
PatchRanger commentedAnswering your question: yes, right now you need to add each webform form manually. The table at admin/config/people/botcha/form includes all forms that are known by BOTCHA - so if there is no some concrete form then you should add it.
Let's turn it into a feature request: I think it makes sense to add webform forms to the list (though I think we shouldn't protect them by default - just list them).
Comment #2
PatchRanger commentedBy the way (I will not get tired mentioning it):
If you are interested in getting this issue closed - please consider donating using PatchRanger service. Each donation - is in fact a bounty which developers will be rewarded with after fixing the issue. For more details see http://drupal.org/project/botcha#how-much-does-it-cost.
Comment #3
millenniumtreeHow about an option to add botcha to all webforms?
What about a wildcard in the form ID?
That way you just enter a form ID of 'webform_client_form_*' and you're done.
Comment #4
hctomIMHO the special
webform_client_form_*form ID absolutely makes more sense than listing all webforms by default. We work for a portal page that hosts hundreds or even thousands of contest forms utilizing thewebformmodule. If all these form IDs would have been listed on the BOTCHA admin page, it won't be accessible anymore because of tons of data.The above stated special form ID should be enough to protect all webforms. It is unique (especially because of the "*" character in it, which no other form ID will ever have) and so it should be easy to filter that case in the
BotchaFormController::isEnabled()method.I will provide a patch for that in the next comment for the
7.x-3.x-devbranch, because we urgently need this feature.EDIT: Unfortunately the above stated special form ID collides with the validation of allowed input of form IDs and I guess it is not the best name, because this will also be used for the
botcha_enabled_FORM_IDvariable name. So I suggest the following special ID:__webform_client_form__all__.Comment #5
hctomAttached you can find a patch which provides the special
__webform_client_form__all__form ID handling to target all webforms at once. Nevertheless with this implementation it is still possible to create different configs for special webforms by their real form ID, which will always take precedence over the special form ID.NOTE: This should work as a quick fix, but for the future there should be something better like regular expression handling or similar. Unfortunately this would change a lot in the current API (e.g. enabled status cannot be saved in a variable anymore having the form ID in its name - this may be solved to move this information into the corresponding row in the
botcha_recipebook_formtable or another specific table containing this information), so there should be a follow up issue to make this more robust.I'd appreciate your feedback on my proposed quick fix solution.
Comment #6
akshita commentedHi
My apologies first for posting this question here. I have installed Botcha and its dependencies on dev environment. Not I am not sure how to test my webform to make sure botcha is working.
Any help is highly appreciable.
Thanks
Rev