Skip to content

Instantly share code, notes, and snippets.

@taleeb35
Created September 22, 2014 13:56
Show Gist options
  • Save taleeb35/f1215d2a6d7dcb9595f7 to your computer and use it in GitHub Desktop.
Save taleeb35/f1215d2a6d7dcb9595f7 to your computer and use it in GitHub Desktop.
<?php
echo $this->Form->input('control_frequency_id', array('id' => 'frequency'));
echo $this->Form->input('name', array('id' => 'week_day'));
?>
<script type="text/javascript">
$('#frequency').hide();
{
selection = $(this).val();
switch(selection) {
case 'Weekly':
$('#week_day').show();
break;
default:
$('#week_day').hide();
break;
}
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment