Skip to main content
added 13 characters in body
Source Link
Amit Verma
  • 779
  • 2
  • 8
  • 18

You need to use jquery for this.

Step 1: Add an id(say 'listID') to your current field Step 2: Add a class(say 'customClassName hide') to next field Step 3: Find out the value of the selected valueitem from the list using jquery and add/remove class as below : $('#listID').change(function () { var formValue = $(this).val(); var RequiredValue = '0'; // field to be shown on this value if(formValue == RequiredValue){ newClass = 'show customClassName'; }else{ newClass = 'hide customClassName'; } $('.customClassName').removeClass().addClass(newClass); }); 

You need to use jquery for this.

Step 1: Add an id(say 'listID') to your current field Step 2: Add a class(say 'customClassName hide') to next field Step 3: Find out the value of the selected value using jquery and add/remove class as below : $('#listID').change(function () { var formValue = $(this).val(); var RequiredValue = '0'; // field to be shown on this value if(formValue == RequiredValue){ newClass = 'show customClassName'; }else{ newClass = 'hide customClassName'; } $('.customClassName').removeClass().addClass(newClass); }); 

You need to use jquery for this.

Step 1: Add an id(say 'listID') to your current field Step 2: Add a class(say 'customClassName hide') to next field Step 3: Find out the value of the selected item from the list using jquery and add/remove class as below : $('#listID').change(function () { var formValue = $(this).val(); var RequiredValue = '0'; // field to be shown on this value if(formValue == RequiredValue){ newClass = 'show customClassName'; }else{ newClass = 'hide customClassName'; } $('.customClassName').removeClass().addClass(newClass); }); 
Source Link
Amit Verma
  • 779
  • 2
  • 8
  • 18

You need to use jquery for this.

Step 1: Add an id(say 'listID') to your current field Step 2: Add a class(say 'customClassName hide') to next field Step 3: Find out the value of the selected value using jquery and add/remove class as below : $('#listID').change(function () { var formValue = $(this).val(); var RequiredValue = '0'; // field to be shown on this value if(formValue == RequiredValue){ newClass = 'show customClassName'; }else{ newClass = 'hide customClassName'; } $('.customClassName').removeClass().addClass(newClass); });