I have a smartgrid, and need to add a custom form during an insert. 
Basically I just want to add some html and hide the original form. Very 
easy to do with some javascript. My problem is that this is the first time 
I have tried to use the include statement. And it seems to behave very 
weird for me:

{{=grid}}
{{if special_view_to_add_custom_form:}}
    {{print 'Adding custom form.'}}
    {{include 'folder/custom_way_to_fill_form.html'}}
{{pass}}

{{# Or to make it more clear:}}

{{if True:}}
    {{include 'folder/custom_way_to_fill_form.html'}}
    {{# folder/custom_way_to_fill_form.html NOT INCLUDED}}
{{pass}}

{{if False:}}
    {{include 'folder/custom_way_to_fill_form.html'}}
    {{# folder/custom_way_to_fill_form.html INCLUDED}}
{{pass}}



Is this not the correct way to do it? My problem is that if the variable 
special_view_to_add_custom_form is set to true The print statement is 
called but the include statement is not run.

If, on the other hand special_view_to_add_custom_form is set to false. The 
print statement does not run, but the html is included. It seems the 
include statement does the opposite of what it should do!

Any idea?

-- 
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/groups/opt_out.

Reply via email to