i think it can be achieve in the view part by jquery.
e.g. i assume you use sqlform.grid with the table food and have the table
field food_type (requires=IS_IN_SET('Pizza', 'Steak')) and field
specific_food
*default/food.html*
{{extend 'layout.html'}}
{{=grid}}
<script>
jQuery(document).ready(function(){
if(jQuery('#food_food_type').val() == 'Pizza'){
jQuery('#food_specific_food__row').show();
jQuery('#food_food_type').change(function(){
if(jQuery('#food_food_type').val() == 'Pizza')
jQuery('#food_specific_food__row').show();
else
jQuery('#food_specific_food__row').hide();});}
else {
jQuery('#food_specific_food__row').hide();
jQuery('#food_food_type').change(function(){
if(jQuery('#food_food_type').val() == 'Pizza')
jQuery('#food_specific_food__row').show();
else
jQuery('#food_specific_food__row').hide();});}
});
</script>
hope this can help
best regards
--
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.