Yes, first I crete the entry using the grid add form without problems,
when I open the edit form, the image is in the field, but when I submit
the form without changes, the validator says that there is no image.
El 06/12/17 a las 14:32, Dave S escribió:
On Wednesday, December 6, 2017 at 11:06:02 AM UTC-8, Carlos Cesar
Caballero wrote:
That's the issue, I don't want null values, the user shouldn't
remove the image without upload a new one, but when I use the
grid's edit form, the validation error is triggered if the user
edit another field, so the form can't be submitted without
uploading a new image.
Does the edit form ... and that field in particular ... get
pre-populated? If so, the existing value should be what is submitted.
But I'm a bit vague about SQLFORM.grid(), so I'm not going to be much
help.
/dps
El 06/12/17 a las 13:06, Val K escribió:
yes, if you want to allow null-value - use IS_EMPTY_OR wrapper
IS_EMPTY_OR(IS_IMAGE(...))
On Wednesday, December 6, 2017 at 8:48:06 PM UTC+3, Carlos Cesar
Caballero wrote:
Hi, I have being using web2py for some time, but I don't use
files too
often, now I am using the IS_IMAGE, but using the grid on
edit it's
throwing a validation error if the user don't set a new image.
It's a bug or is the default behavior?
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py
<http://github.com/web2py/web2py> (Source code)
- https://code.google.com/p/web2py/issues/list
<https://code.google.com/p/web2py/issues/list> (Report Issues)
---
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+un...@googlegroups.com <javascript:>.
For more options, visit *MailScanner ha detectado un intento de
fraude en la siguiente p�gina web "groups.google.com". /No/
conf�e en esta p�gina web:* *MailScanner ha detectado un intento
de fraude en la siguiente página web "groups.google.com". /No/
confíe en esta página web:* *MailScanner ha detectado un intento
de fraude en la siguiente p�gina web "groups.google.com". /No/
conf�e en esta p�gina web:* https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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
<mailto:web2py+unsubscr...@googlegroups.com>.
For more options, visit *MailScanner ha detectado un intento de fraude
en la siguiente p�gina web "groups.google.com". /No/ conf�e en esta
p�gina web:* https://groups.google.com/d/optout
<https://groups.google.com/d/optout>.
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
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/d/optout.