[web2py] Re: Hide form and erase input

2012-12-02 Thread Daniele
A combination of the two. Since I use bootstrap, I edited the html in the view, but i also added some parameters to the custom form in the controller, such as form['_class'] = "form-horizontal" On Sunday, December 2, 2012 2:29:57 AM UTC, Julian Sanchez wrote: > > Just curious... did you end up

[web2py] Re: Hide form and erase input

2012-12-01 Thread Julian Sanchez
Just curious... did you end up using a completely custom form or were you able to manipulate the SQLFORM inside the controller? On Saturday, December 1, 2012 7:03:33 AM UTC-6, Daniele wrote: > > I ended up putting them in separate divs and hiding the entire div. Works > like a charm! > Thanks gu

[web2py] Re: Hide form and erase input

2012-12-01 Thread Daniele
I ended up putting them in separate divs and hiding the entire div. Works like a charm! Thanks guys On Thursday, November 29, 2012 4:44:50 PM UTC, Anthony wrote: > > The easiest way is probably via a custom form: > http://web2py.com/books/default/chapter/29/07#Custom-forms. > > Another option --

[web2py] Re: Hide form and erase input

2012-11-29 Thread Anthony
The easiest way is probably via a custom form: http://web2py.com/books/default/chapter/29/07#Custom-forms. Another option -- each table row or div containing a field input has an id that starts with "[tablename]_", so you could use a jQuery selector like: jQuery('[id^=tutor_]').hide() That wil

[web2py] Re: Hide form and erase input

2012-11-29 Thread Daniele
I could do that. Would I need to add the div directly in the controller or the view? My controller looks something like this now: def mypage(): form = SQLFORM(db.mytable) return dict(form=form) I guess there should be a way to edit the SQLFORM to add an extra div? Thanks guys On Thursda

[web2py] Re: Hide form and erase input

2012-11-29 Thread Anthony
Maybe you could put all the fields inside a div and then hide/show the whole div. Anthony On Thursday, November 29, 2012 7:45:22 AM UTC-5, Daniele wrote: > > Hmm, that gets rid of the input boxes but not of the fieldnames as well. I > guess I'll have to do it manually for each field. > > > > On

[web2py] Re: Hide form and erase input

2012-11-29 Thread Niphlod
fieldnames as in "labels" ? On Thursday, November 29, 2012 1:45:22 PM UTC+1, Daniele wrote: > > Hmm, that gets rid of the input boxes but not of the fieldnames as well. I > guess I'll have to do it manually for each field. > > > > On Thursday, November 29, 2012 9:40:29 AM UTC, Niphlod wrote: >>

[web2py] Re: Hide form and erase input

2012-11-29 Thread Daniele
Hmm, that gets rid of the input boxes but not of the fieldnames as well. I guess I'll have to do it manually for each field. On Thursday, November 29, 2012 9:40:29 AM UTC, Niphlod wrote: > > $(":input") ? > > On Thursday, November 29, 2012 2:29:46 AM UTC+1, Daniele wrote: >> >> Hello all :) >>

[web2py] Re: Hide form and erase input

2012-11-29 Thread Niphlod
$(":input") ? On Thursday, November 29, 2012 2:29:46 AM UTC+1, Daniele wrote: > > Hello all :) > I have a db.define_table that defines a particular role and all its > fields. One of the fields is a boolean, which will display as a checkbox in > the SQLFORM. > > What I'd like to do is hide ALL th