[web2py] Re: view and edit on same page

2015-08-03 Thread Dave S
On Monday, August 3, 2015 at 4:51:08 PM UTC-7, Alex Glaros wrote: > > okay, changed the order of the statement and now works perfectly, thanks! > Glad to hear it! /dps > > .getElementById("hide_if_editing").style.visibility="hidden"> "icon-pencil"> Edit this check list type > > > -- Res

[web2py] Re: view and edit on same page

2015-08-03 Thread Alex Glaros
okay, changed the order of the statement and now works perfectly, thanks! Edit this check list type -- 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) --- Y

[web2py] Re: view and edit on same page

2015-08-03 Thread Alex Glaros
thanks Dave but it makes it so that the whole edit form also never appears. Even if it's not in the DIV that gets hidden. Form appeared correctly before. See anything wrong here? DIV labeled "hide_if_editing" get correctly hidden. How to get the form to appear? Is it because it's called from

[web2py] Re: view and edit on same page

2015-08-03 Thread Dave S
On Monday, August 3, 2015 at 2:51:35 PM UTC-7, Alex Glaros wrote: > > is there a way to make the edit button () and > other non-editing info temporarily disappear when editing in the form? > > how would view "know" if in edit mode? > > You could have the onclick() routine toggle visibility as w

[web2py] Re: view and edit on same page

2015-08-03 Thread Alex Glaros
is there a way to make the edit button () and other non-editing info temporarily disappear when editing in the form? how would controller "know" if in edit mode? thanks Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source co

[web2py] Re: view and edit on same page

2015-07-31 Thread Alex Glaros
Thanks for for taking the time to write detailed examples Jorge. Might have minor questions later but works great so far! Alex -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/lis

[web2py] Re: view and edit on same page

2015-07-29 Thread JorgeH
Exactly, Just as Dave S says. ;) On Wednesday, July 29, 2015 at 9:18:10 PM UTC-5, Dave S wrote: > > > > On Wednesday, July 29, 2015 at 4:34:30 PM UTC-7, Alex Glaros wrote: >> >> Hi Jorge, >> >> are there two views? view and new-view (formula _general)? >> > > I would expect a view for the page

[web2py] Re: view and edit on same page

2015-07-29 Thread JorgeH
yes. The first view, lets call it formula. for this example, just a tiny button with a pencil on it It calls the controler called 'formula_general' def formula_general(): fields = ['nombre'] record = session.formula form = SQLFORM(db.formulas, record, fields=fields) requ

[web2py] Re: view and edit on same page

2015-07-29 Thread Dave S
On Wednesday, July 29, 2015 at 4:34:30 PM UTC-7, Alex Glaros wrote: > > Hi Jorge, > > are there two views? view and new-view (formula _general)? > I would expect a view for the page (page.html) and the view for the component (formula_general.load, as listed in the onclick(), and a view for th

[web2py] Re: view and edit on same page

2015-07-29 Thread Alex Glaros
Hi Jorge, are there two views? view and new-view (formula _general)? thanks, Alex -- 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 me

[web2py] Re: view and edit on same page

2015-07-27 Thread JorgeH
I do it adding a button like you did, but view: div class="subtitulo"> {{=datos_formula.nombre}} controller:

[web2py] Re: view and edit on same page

2015-07-26 Thread villas
Hi Alex I suggest you do it in Javascript. Have view and edit sections in separate divs. Show and first and hide the other. Then when you click the button, toggle the show and hide. Hope that works for you. D On Sunday, 26 July 2015 03:35:46 UTC+1, Alex Glaros wrote: > > not sure how to de