Hi There,

I am new to Mezzanine so please forgive me if i'm missing something obvious.

I'm using Mezzanine to serve pages for use inside Facebook (FB) - 
essentially so my admin users can create custom forms for use in Facebook 
Page Tabs.

Mezzanine is pretty much vanilla except that i have added some 
EXTRA_MODEL_FIELDS via settings.py to mezzanine.forms.models.Form. I have 
also created a processor_for(Form) decorator to handle the FB 
signed_request data, which is then passed on to a custom form template as 
extra context.

My issues is that when called from within FB the form is rendered with all 
the error message data showing instead of as an unbound form. i believe 
this might be because FB submits the signed_request as POST data.

I tried to fix the behaviour by adding some Default Values to the form 
instance via the admin, but when viewed in the context of FB this has no 
effect - the unbound form defaults are not displayed and the validation 
errors are still shown. (fyi outside the context of FB this unbound form 
displays normally, with the Default Values inserted into the form as 
expected and no error messages). 

As per comments 
here<http://lizdouglass.wordpress.com/2010/11/01/django-form-validation-why-does-the-error-message-always-appear/>and
 
here<http://stackoverflow.com/questions/653735/django-forms-set-an-initial-value-to-request-user>i
 have tried to add an "initial: {}" to the request passed to the form in 
the processor_for(Form) but this does not have the desired effect (i think 
because initial need to be passed to the form as a kwarg - but I'm really 
not clear on that.)

In summary my question is; How do i get a Mezzanine form to correctly 
render as an unbound form in a context like a Facebook Page Tab where it is 
called as part of request that includes other POST data?

Thanks in advance.

Ben

-- 
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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to