I have found a script that I was able to manipulate to work with Machform and now I can filter/remove drop-down menu options based on the selection of another drop-down selection. I feel this feature is WAY over do from Machform and I think it could be added fairly easy. But never the less, this will work in the mean time. Enjoy!
Example of Dropdowns------------------------------------------
Drop-down1=element_45
Option a = 1
Option b = 4
Drop-down2=element_1
Option d = 1
Option e = 2
Option f = 3
Option g = 4
Option h =5
Option i =6
Code--------------------------------------------------------------------
$(document).ready(function() {
var selectClone = $('#element_1').clone();
$('#element_45').change(function() {
var val = parseInt($(this).val());
$('#element_1').html(selectClone.html())
switch(val) {
case 1 : $("#element_1 option[value='3']").remove();
case 1 : $("#element_1 option[value='4']").remove();;break;
case 4 : $("#element_1 option[value='1']").remove();
case 4 : $("#element_1 option[value='6']").remove();;break;
}
});
$('#element_45').trigger('change'); });
Code Notes__________________________________________
- Create a .js file with the code above and set it to load when the form does.
- Element is the drop-down box and the number assigned from Machform.
- Value is number assigned to option in the drop-down.
- Case number is the number assigned to first down-down options.
Change those three different numbers to match your form and you can hide options based on what is selected. You can add additional case lines if need be. I've got this working and filtering over 250 items on one of my forms.
I'm just a newbie with JavaScript, but I'm willing to help explain if you have questions.
Thanks,
Aaron