// This example shows how we can manage display state using custom code.

// A few notes:

// 1. For this example work we need to create a form
//    with a radio, select, or text item and 3 form fields.

// 2. The Name/Values of each field must match below.



// Show the field based on the in_value, which is 
// simply the value of the form field item in question.

// In other words, the case items are simply the 
// form item values already provided.

switch(in_value){
case 'Option 1' :
  fbc.showField(event, 'text1', '');
  break;
case 'Option 2' :
  fbc.showField(event, 'text2', '');
  break;
    case 'Option 3' :
fbc.showField(event, 'text3', '');
  break;
}