Re: [web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-21 Thread Vid Ogris
Thanx. Works like a charm. One more question though. How to change the links in table for view, Edit, delete. Now I have only hyperlinked text, while I would like to have buttons? 2014-07-16 16:21 GMT+02:00 Anthony : > #Validators >> * db.worker.w_status.requires = IS_IN_DB(db,db.status.s_code

Re: [web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Anthony
> > #Validators > * db.worker.w_status.requires = IS_IN_DB(db,db.status.s_code) # This > created drop down but does not insert the right value into field* > Because w_status is a reference field, it must store the record ID from the db.status table, not the s_code value (which is a text field).

Re: [web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Vid Ogris
Hell I changed to SQLFORM.grid. It kind of works now. I even managed to include status as drop down in my edit view. I created a left join on my status table. The problem I am facing now is that when a user selects a status for worker and clicks submit I get an error. looks like it is trying to

[web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Anthony
> > workers = db(db.worker.w_organisation == 10).select(db.worker.w_id_w, > db.worker.w_organisation, db.worker.w_first_name, > db.worker.w_last_name,db.worker.w_nick_name,db.worker.w_email,db.worker.w_status,db.worker.w_note).as_list() > What is the above for? It is not used below. > #Defin

[web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Yebach
Also, how do I costumize the edit view (etc. drop down menus, filed size). The input text fields are enormous. Using set max length does not work. It prevents the text larger then set to be inserted (but only on submit button click it rases an error - is it possibel to create an on the fly valid

[web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-16 Thread Yebach
models for two tables that need to be shown db.define_table('worker', Field('id', type ='id'), Field('w_organisation', type ='integer'), Field('w_user', type ='integer'), Field('w_status', 'reference status'), Field('w_first_name',type='text'), Field('w_last_name',type='text'), Field('w_nick_name'

[web2py] Re: SQLFORM smart grid child table fields and editing excelike

2014-07-15 Thread Anthony
On Tuesday, July 15, 2014 6:58:28 AM UTC-4, Yebach wrote: > > Hello > > I am using SQLFORM smartgrid. My child table field is not shown on my form > (status.s_code). Why? > Can you show your models? Does the child table have a field of type "reference" that refers to the parent table? > > Als