when you are using custom form, please analyze your output source code 
first in browser (inspect elements or view source code). after that please 
add the jquery things based on the row of field you want to have the jquery 
effect (show or hide) when you use custom form.

best regards

On Thursday, May 2, 2013 10:48:11 PM UTC-4, Josh Myers wrote:
>
> Hey Group,
>
> I am new to web2py and I am working to create a custom form from the 
> SQLForm.Factory with a conditional field built in.  
>
> I have two questions.
>
> 1.  Using a conditional field based on the checkbox, I can get it to work 
> if I don't use the custom form, but I can't get it to work with the custom 
> form.  Below is my code in the view.
>
> {{extend 'layout.html'}}
> {{=form.custom.begin}}
> <b> Set Model Options </b>
> <div> Model Name: {{=form.custom.widget.GAWR_Model_Name}} </div>
> <div> Sales Set: {{=form.custom.widget.Sales_Set}} </div>
> <b> Determine the Bandwidth </b>
> <script>
> jQuery(document).ready(function(){
>    jQuery('#no_table_band__row').hide();
>    jQuery('#no_table_CV').change(function(){
>         if(jQuery('#no_table_CV').attr('checked'))
>             jQuery('#no_table_band__row').show();
>         else jQuery('#no_table_band__row').hide();});});             
> </script>
> <div> {{=form.custom.widget.CV}} Manually Set the Bandwidth (default is 
> Cross Validation) </div>
> {{=form.custom.submit}}
> {{=form.custom.end}}
>
> 2.  I would like to be able to make a conditional field based on something 
> other than a checkbox, like the value of a set of radio buttons, multiple 
> checkboxes, or a standard select dropdown.  In the latter case, a User 
> would select a certain value in a dropdown and then another dropdown would 
> appear based on the value the User chose.  Can you point me toward any 
> resources on how to do that?
>
> Thank you.
>
> - Josh
>

-- 

--- 
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