Hide / Show fields in a user form Conditionally based on Cascade Pulldown

Mar 14, 2014 at 5:40 PM
I'm wondering how I can get this type feature to work while utilizing the cascading options feature as well as the complex to simple pulldown.

$('select[id$="Report_Type"]').live("change", function()
{
    if($(this).val()=='Rebuttal')
        {   
                var title=$("[id$='Evaluations']");    
                title.show();
        }
        else
        {
           var title=$("[id$='Evaluations']");
           title.hide();
        }
});

I'm not sure how to get this working while utilizing the Spservices features.
Apr 4, 2014 at 2:17 PM
Hmmm...I don't think you need the "live' method. The 'change' method should work on its own. Also, declaring the var 'title' isn't necessary. That part isn't an issue for anything except saving you some writing in the future. So, it should work as....
$('select[id$="Report_Type"]').change(function() {
  if($(this).val()=='Rebuttal') {   
    $("[id$='Evaluations']").show();
  }
  else {
    $("[id$='Evaluations']").hide();
  }
}); 
Geoff