I have two options for select. I am trying to get it to where if the user selects "Case Manager" for option for select #1, then option for select #2 appears.
Here is my code:
Haml:
= form_tag app_configurations_path, :method=> 'put' do |f|
-@all_configurations.each do |config|
=hidden_field_tag "config_ids[]", config.id
%label= t('workflow.duplicate_claim_manager')
= select_tag('duplicate_claim[case_manager]', options_for_select(@case_managers_drop_down, config.configuration_value),name: "config[#{config.id}]", :include_blank => true)
%label= t('workflow.duplicate_claim_manager_secondary')
= select_tag('duplicate_claim_secondary[case_manager]', options_for_select(@case_managers_drop_down, config.configuration_value),:type=>"hidden",name: "config[#{config.id}]")
I thought :type=>"hidden" would correctly hide the duplicate_claim_secondary, but it is not hiding it.
And then secondly, I want to make it to where if they click "Case Manager" it unhides option_for_select. Here is the Javascript I have so far:
if ($("#duplicate_claim_case_manager :selected").text() == "Case Manager") {
$("#duplicate_claim_manager_secondary).setAttribute(type => text)
}
Unfortunately I can't test the Javascript because I first need to correctly hide it. Any ideas?
