Dynamic Drop-down change form example


Tutorials - Tutorials

User Rating: / 0
Dynamic Drop-down change form example

Dynamic drop-down change form

In order to create a Dynamic Drop-down change form with RSForm! Pro follow these instructions:

    • Add two drop-down fields to your form;
    • Insert a script, similar to the one below in the Javascript section from the Form Properties;
  <script type="text/javascript">   function dynamic1(parent,child){ //You will have to adjust the parent arrays and the values assigned to them in order to insert the values of your choice var parent_array = new Array();   parent_array[''] = ['Please select a manufacturer'];   parent_array['Audi'] = ['A3','A4','A5','A6','A8','Q5','Q7','S3','S4','S5','S6','S8','RS6'];   parent_array['Dacia'] = ['Sandero','Logan'];   parent_array['FIAT'] = ['Bravo','Punto','Grande Punto'];   parent_array['Peugeot'] = ['207','308','407','607'];   parent_array['SEAT'] = ['Ibiza','New Ibiza','Leon'];   parent_array['Skoda'] = ['Fabia','Octavia Tour','Octavia 2','Superb'];   var thechild = document.getElementById(child);   thechild.options.length = 0;   var parent_value = parent.options[parent.selectedIndex].value;   if (!parent_array[parent_value]) parent_value = '';   thechild.options.length = parent_array[parent_value].length;   for(var i=0;i<parent_array[parent_value].length;i++){   thechild.options[i].text = parent_array[parent_value][i];   thechild.options[i].value = parent_array[parent_value][i];} }   </script>  
    • In order to trigger the function above, add in the Additional Attributes section of the main drop-down list the following code:

About Us

Royal Developer Top three Web Designing and Web Development Company in Dehradun, Uttarakhand, India. Royal Developer Best SEO Company in Dehradun takes pride in its philosophy of 'Employee First' which empowers to create a real value for the customers. Royal Developer can offer Best and cheap Website Development Software Development & SEO Services. We are the Best service Provider of SEO, SEM, SMO Services Company in Uttarakhand. Web Designing Course in Dehradun, Web Designing Classes in Dehradun, Web Design Training Institute in Dehradun, Web designing institute in dehradun, Best institute for web designing in dehradun, Web development training in dehradun, Web development course in dehradun, Web Designing Training in Dehradun.


- Contact Information - 

Add : RDIT Services Pvt Ltd, 3rd Floor, RGM Plaza, Above Chandu Canteen,
          23 Chakrata Road, Dehradun - 248001, Uttarakhand, India

Email : nikhil@royaldeveloper.inroyaldeveloper.india@gmail.com 


 : +91 8171200108, +91 8979462451,
                                  +91 7895753921

Quick Enquiry Form

Enter your full name

Enter your valid email address

Enter your correct mobile number

Invalid Input

Your Message
Invalid Input

Enter Code
Enter Code
  RefreshInvalid Input


You are here: Home Tutorials Dynamic Drop-down change form example