Hi,
I have a form which is retrieving data from a database via lookup. The data retrieved is based on four fields that and thus there is an autofill button. There is a fifth "Action" field which is a drop down field with three options, "Add", "Delete", "Change". When I fill all the fields and hit the lookup button, data fills the table alright. But I require that when the choice in the Action field is not Add, the Add button of the Table be hidden once the autofill button is clicked. The Add button should be available only when "Add" is selected. The code am trying is not working. Please let me know what am missing. #q62 is the table add button id. action is the class of the dropdown field
$('.autofill').on('click', function () {
var actonform = $('.action select').val();
if (actonform == "Add") {
$('#q62').show();
} else { $('#q62').hide();
}
});