Change
if form.process().accepted:
form.vars.PostDate = request.vars.PostDate
response.flash = T("Thank you!")
to
if form.process(keepvalues = True).accepted:
response.flash = T("Thank you!")
2017-01-20 4:02 GMT-02:00 Armando Hernandez <
armando.hernandez.ma...@g
Assuming PostDate is a field of type datetime Try this before calling SQLFORM
db.QuarterMaster.PostDate.default = request.now
If PostDate is a field of type date use
db.QuarterMaster.PostDate.default = request.now.date()
and remove all the
form.vars.PostDate assignments
--
Resources:
- http:
I have a straight-forward controller function for entering the primary data:
def index():
"""
"""
response.flash = T("Hello World")
form = SQLFORM(db.QuarterMaster)
form.vars.PostDate = str(request.now.year) + "-" + str(request.now.month
) + "-" + str(request.now.day)
if f
I have an SQLFORM where I wanted the value of field 3 to depend on the
value of field 2, sort of like cascading autocompletes, but not quite.
Field 3 was going to be populated with the length of the string in Field
2, so I tried adding to my view
jQuery(document).ready(function(){
jQuery('
I have a form and I load a pre existing value that I generate internally
before I call the form. What I want to see on the form is the value shown
up but just as plain text so the user cannot modify it. If I do
readable-False then it just shows None for the value rather than the value.
How would I
hi,
is it possible to add custom form field that reference to another table?
i've tried both form, sqlform, sqlform.factory and crud it seems that it
can't handle it or maybe there is something i missed.
my goal is to show only id in the form sale header which is refer to
customer table and whe
I have a table with two fields.
EN | SP
Hello | Hola
I | Yo
Both the fields A and B represent the same vale in two languages.
I want in a drop-down field , the Spanish value automatically selected,
when english value is set to a specific word.
It should also work , if I set the spanish wor
Is there any way to change the behaviour of the field in web2py.
I want to use the ente rkey in the number side of the keyboard for
jumping into the next field.
looks like there is something similar in the multiple value columns.
8 matches
Mail list logo