Ok, that's what I did, though I had to check the label name which is not 
ideal 
since 
https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/forms/page_processors.py#L44:L45
 
doesn't pass the ID or field type. Being able to check the field type might 
be a good future enhancement.

On Wednesday, May 24, 2017 at 4:26:03 PM UTC-4, Eduardo Rivas wrote:
>
> My guess is you could check the field ID when looping in the email 
> template. Somewhere around here: 
> https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/forms/templates/email/form_response.html#L6-L11
>
> You'll also need to edit the plain text version.
>
> On 2017-05-24 2:23 PM, Dominique wrote:
>
> When using the FORMS_EXTRA_FIELDS technique, what is the recommended 
> approach for keeping the captcha field/value from showing up in the form 
> response emails?
>
>
>
>
> On Friday, January 15, 2016 at 8:55:38 AM UTC-5, Alexandre wrote: 
>>
>> You have to add a ReCaptchaField to your page form. 
>>
>>
>>
>>
>> El divendres, 15 gener de 2016 13:57:06 UTC+1, Alexander Tyapkov va 
>> escriure: 
>>>
>>> Thanks! I will try this approach later, but for me registering with 
>>> EXTRA_FORM_FIELDS also didn't help. Probably your solution will help.
>>>
>>> 2016-01-15 10:44 GMT+01:00 Alexandre Busquets Triola <abus...@gmail.com>
>>> :
>>>
>>>> Well, it's easy, with django-recaptcha. 
>>>>
>>>> pip install django-recaptcha
>>>>
>>>> and then in settings.py set
>>>>
>>>> INSTALLED_APPS = (
>>>> ...
>>>>     "captcha",
>>>> ...
>>>> )
>>>>
>>>> FORMS_EXTRA_FIELDS = (
>>>>     (100, "captcha.fields.ReCaptchaField", "ReCaptcha"),
>>>> )
>>>>
>>>> RECAPTCHA_PUBLIC_KEY = ...
>>>> RECAPTCHA_PRIVATE_KEY = ...
>>>>
>>>>
>>>> Fins ara,
>>>> Alexandre
>>>>
>>>>
>>>> El dijous, 14 gener de 2016 19:26:19 UTC+1, Alexander Tyapkov va 
>>>> escriure: 
>>>>>
>>>>> Yes, I have done it but not is the way I have expected. I didn't 
>>>>> manage to register ReCaptcha field inside of Mezzanine.
>>>>> Instead, I have created my own form in which I have included recaptcha 
>>>>> field and afterwards used page_processors for every page where I needed 
>>>>> recaptcha
>>>>>
>>>>> Hope, this will help!
>>>>>
>>>>> Best regards,
>>>>> Alexander
>>>>>
>>>>> 2016-01-14 15:53 GMT+01:00 Alexandre Busquets Triola <
>>>>> abus...@gmail.com>:
>>>>>
>>>>>> Hi Alexander,  
>>>>>>
>>>>>> I also need use recaptcha with mezzanine. Have you do it?
>>>>>>
>>>>>>
>>>>>>
>>>>>> El diumenge, 20 desembre de 2015 19:54:30 UTC+1, Alexander Tyapkov va 
>>>>>> escriure: 
>>>>>>
>>>>>>> I have updated Mezzanine to 4.0.1 and found out that the code which 
>>>>>>> registers additional field for forms is not working anymore.
>>>>>>> I also want to move to reCaptcha. For that I have downloaded 
>>>>>>> django-recaptcha and have following code:
>>>>>>>
>>>>>>> from captcha import fields as captcha_fields
>>>>>>>
>>>>>>> GREATEST_ID = max(c[0] for c in mezzanine_fields.NAMES)
>>>>>>> ID = GREATEST_ID + 1
>>>>>>> NAME = 'CAPTCHA'
>>>>>>> setattr(mezzanine_fields, NAME, ID)
>>>>>>> mezzanine_fields.NAMES = list(mezzanine_fields.NAMES)
>>>>>>> mezzanine_fields.NAMES.append((ID, _('Captcha')))
>>>>>>>
>>>>>>> mezzanine_fields.NAMES = tuple(mezzanine_fields.NAMES)
>>>>>>> mezzanine_fields.CLASSES[ID] = captcha_fields.ReCaptchaField
>>>>>>>
>>>>>>> The problem is that registered field doesnt appear in admin. Can 
>>>>>>> anybody suggest something?
>>>>>>>
>>>>>>> P.S. Also I have found that it is possible to user FORM_EXTRA_FIELDS 
>>>>>>> in settings but no good example is provided. Can that help? Can anybody 
>>>>>>> post an example of usage?
>>>>>>>
>>>>>> -- 
>>>>>> You received this message because you are subscribed to a topic in 
>>>>>> the Google Groups "Mezzanine Users" group.
>>>>>> To unsubscribe from this topic, visit 
>>>>>> https://groups.google.com/d/topic/mezzanine-users/C9lyFkhV9wU/unsubscribe
>>>>>> .
>>>>>> To unsubscribe from this group and all its topics, send an email to 
>>>>>> mezzanine-use...@googlegroups.com.
>>>>>> For more options, visit https://groups.google.com/d/optout.
>>>>>>
>>>>>
>>>>> -- 
>>>> You received this message because you are subscribed to a topic in the 
>>>> Google Groups "Mezzanine Users" group.
>>>> To unsubscribe from this topic, visit 
>>>> https://groups.google.com/d/topic/mezzanine-users/C9lyFkhV9wU/unsubscribe
>>>> .
>>>> To unsubscribe from this group and all its topics, send an email to 
>>>> mezzanine-use...@googlegroups.com.
>>>> For more options, visit https://groups.google.com/d/optout.
>>>>
>>>
>>> -- 
> You received this message because you are subscribed to the Google Groups 
> "Mezzanine Users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to mezzanine-use...@googlegroups.com <javascript:>.
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to