You are viewing limited content. For full access, please sign in.

Question

Question

Auto-populate dropdown based on condition

asked on May 29, 2017

Hello,

I have a rule into "Identification Type". When NIC is selected, the 2 following field, "NIC(Mauritian Residents Only)" and "NAtionality" must appear.

 

Now I have to put another rule that auto-populate the "Nationality" Droptown to Mauritius. I tried to put this rule through Field Rules but it don't work. Please advice

0 0

Replies

replied on June 4, 2017

You can use custom script like this (q1 is radio button field while q2 is drop-down field):

$(document).ready(function(){
  $('#q1 input').change(function(){
    if ($(this).val() == 'NIC' && $(this).is(':checked')){
      $('#q2 select').val('Mauritian');
    }
  });
})

 

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.