I think you should be able to call form.process() in the view, though it's 
probably a better idea to do this in the controller. Can you show your code?

Anthony

On Thursday, August 1, 2013 11:12:22 AM UTC-4, Gökçen Eraslan wrote:
>
> Hello,
>
> I have a question about the validation of forms created in a view, such as 
> this one in the admin application[1]. This form is submitted to upload_file 
> function of the default controller here[2]. 
>
> In such cases, we don't have a FORM() helper in the controller 
> function[2], so we cannot validate that form using form.process().accepted, 
> is that correct?
>
> So (besides the solution such as creating the form in the controller) how 
> can we validate a form created in a view? There is a validator defined in 
> the form, IS_NOT_EMPTY, but when and how exactly that validator is 
> processed? (By the way I think there is a typo in the definition of this 
> validator, I have filed a pull request about that [3].)
>
> Cheers.
>
> [1] 
> https://github.com/web2py/web2py/blob/master/applications/admin/views/default/design.html#L23
> [2] 
> https://github.com/web2py/web2py/blob/master/applications/admin/controllers/default.py#L1341
> [3] https://github.com/web2py/web2py/pull/154
>
> -- 
> Gökçen Eraslan 
>

-- 

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


Reply via email to