Created
July 19, 2017 17:16
-
-
Save atsea/0db9f5f364f0d9e9fb12b2c5bb129ba8 to your computer and use it in GitHub Desktop.
Change FootPrints Type and subtype
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(function() { | |
$('select[name=problem]').on('change',function() { | |
switch (true) { | |
case $(this).val() == 'Other': | |
$('input:hidden[name=type]').val('Research'); | |
break; | |
case $(this).val() == 'Programming Assistance': | |
$('input:hidden[name=type]').val('Research'); | |
$('input:hidden[name=subtype]').val('Programming Assistance'); | |
break; | |
case $(this).val() == 'Data Management': | |
$('input:hidden[name=type]').val('Research'); | |
$('input:hidden[name=subtype]').val('Data Management'); | |
break; | |
// case $(this).val() == 'Technical Support': | |
// $('input:hidden[name=type]').val('Research'); | |
// $('input:hidden[name=subtype]').val('Technical Support'); | |
// break; | |
case $(this).val() == 'Grant Writing Assistance': | |
$('input:hidden[name=type]').val('Research'); | |
$('input:hidden[name=subtype]').val('Grant Writing Assistance'); | |
break; | |
case $(this).val() == 'GIS and Visualization': | |
$('input:hidden[name=type]').val('Research'); | |
$('input:hidden[name=subtype]').val('GIS and Visualization'); | |
break; | |
case $(this).val() == 'Education and Training': | |
$('input:hidden[name=type]').val('Research'); | |
$('input:hidden[name=subtype]').val('Education and Training'); | |
break; | |
} | |
$('select[name=Cluster_type]').on('change',function() { | |
switch (true) { | |
case $(this).val() == 'Mills Cluster': | |
console.log($(this).val()); | |
$('input:hidden[name=type]').val('Cluster'); | |
$('input:hidden[name=subtype]').val('Mills'); | |
break; | |
case $(this).val() == 'Farber Cluster': | |
$('input:hidden[name=type]').val('Cluster'); | |
$('input:hidden[name=subtype]').val('Farber'); | |
break; | |
case $(this).val() == 'Other': | |
$('input:hidden[name=type]').val('Cluster'); | |
break; | |
} | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment