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 describe this question, but is there a way to avoid 
> writing a separate edit page for a data item by using the same page that 
> displays it, but having a button submitted that says "edit", which enables 
> a conditional statement to edit the data on the same page?
>
> Normally I have a "edit" button on a view page (view_profile_data), which 
> takes user to a separate view page (edit_profile_data).
>
> To avoid creating the edit_profile_data page, is it possible to have a 
> conditional in the view_profile_data page like this:
>
> {{if edit_button is clicked:}}
>     {{=form}}
> {{pass}}
> Does anyone do it like that or does everyone send user to separate edit 
> page?  I guess I'm wondering if there are short-cuts.
>
> thanks,
>
> Alex Glaros
>

-- 
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 message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to