SQLFORM shows the values of non-writable fields but does not put those
values into HTML form widgets, so they are not submitted with the form. A
couple of options:
- Instead of setting writable=False, specify a custom widget for the
fields with the HTML readonly attribute set to true (e.g
thanks Anthony. Could you give me simple example about second idea? It's
noy possible to pass variables to a onvalidation funtion? i.e. onvalidation
doesn't accept parameters...
Il giorno giovedì 31 maggio 2018 00:24:29 UTC+2, Anthony ha scritto:
>
> SQLFORM shows the values of non-writable fiel
On Thursday, May 31, 2018 at 2:27:44 PM UTC-4, Andrea Fae' wrote:
>
> thanks Anthony. Could you give me simple example about second idea? It's
> noy possible to pass variables to a onvalidation funtion? i.e. onvalidation
> doesn't accept parameters...the problem is: how to make that object
> ava
I'm saying thank you Anthony another time...you find every time the right
way...my compliments.
Tell me...in your opinion what is the best python guide/tutorial (for free
or cheap money) to use? What do you suggest?
Have a good day.
Thank you!
Il giorno giovedì 31 maggio 2018 23:32:51 UTC+2, A
please use format as record representation or set it on IS_IN_DB form
validation.
e.g. if you want to show city as a drop down menu in order_bus form :
db.define_table(
'route',
Field('city'),
Field('country_iso'), format = '%(city)s')
db.order_bus.depart_from.requires = IS_IN_DB(db,
Stifan,Winvalid literal for long() with base 10: 'Montego Bay'
On Saturday, November 9, 2013 4:03:15 PM UTC-5, 黄祥 wrote:
>
> please use format as record representation or set it on IS_IN_DB form
> validation.
> e.g. if you want to show city as a drop down menu in order_bus form :
> db.define_table
oopss, sorry didn't notice that you are using SQLFORM.widgets.autocomplete,
yes, it should.
basically the reference type of field is refer to primary key of the table
which is 'id' field, please use it as reference base and then please use
record representation (format) to show it in html form f
When I remove the auto complete widget, the data saves in the database is
it should.
On Saturday, November 9, 2013 7:34:39 PM UTC-5, 黄祥 wrote:
>
> oopss, sorry didn't notice that you are using
> SQLFORM.widgets.autocomplete, yes, it should.
> basically the reference type of field is refer to pri
after two days of bashing your head to the wall, why don't you read the
docs about the autocomplete widget ?
You need to pass the id_field argument
http://web2py.com/books/default/chapter/29/07/forms-and-validators?search=autocomplete#Autocomplete-widget
On Sunday, November 10, 2013 9:56:46
Niphold, thanks for that info, but this is what I have;
db.define_table(
'order_bus',
Field('depart_from'),
Field('arrive_to'),
Field('date', 'date'),
Field('time', db.depature_times), # drop-down select time options
Field('no_of_passengers', db.tickets), # drop-down options to s
10 matches
Mail list logo