Hi,
The syntax if form.vars.pic_upload: worked for me. I was not able to find
the correct If statement.
@ Steve : No I have not used the IS_NOT_EMPTY() validator. Thanks for the
link I will go through it.
Regards,
Arindam
On Fri, Jan 11, 2019 at 6:20 PM 黄祥 wrote:
> had you try IS_NOT_EMPTY()
had you try IS_NOT_EMPTY() validator?
*ref:*
http://web2py.com/books/default/chapter/29/07/forms-and-validators#Range-set-and-equality-validators
best regards,
stifan
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- htt
You can use an if-else or try-except block for that
Like this.
def index():
form = SQLFORM(db.orders)
if form.process().accepted:
if form.vars.pic_upload:
makeThumbnail(db.orders,form.vars.id,(175,175))
else:
#do whatever you want
else:
Hi,
I have a problem with checking whether the file upload field in the
database is empty or not.
In the code mentioned below, the user can either upload a file or submit
the form without uploading a file.
If the user uploads a file then the " makeThumbnail" function should be
called. Otherwise it
4 matches
Mail list logo