Show Hide Fields

By nmsinc - December 3, 2013

I'm saving a section that stores 'num, title, company.

The field grabs data from another section by 'num' and not by 'title'; however, I need to filter the show/hide by 'title' - how can this be done? I have listed the current show/hide section below!

// For each section and list field, copy this block
// Fields will start hidden if they appear in any "fields to show" list 
$GLOBALS['SHOWHIDE_DEPENDANT_FIELDS_CONFIG']['claims_submission']['claim_status'] = array(
  // list option       => fields to show
  ''                        => array(), // show these fields when the topmost '<select>' option is selected
  'Other'               => array('status_other'), 
  '_any_value_'   => array(),  // show these fields when a value not listed above is selected
);

Thanks - nmsinc

nmsinc

By nmsinc - December 9, 2013

Hi Dave,

Thanks for the suggestion, however, I have need of both .val and .text within the plugin, any suggestion?

nmsinc

nmsinc

By Dave - December 12, 2013

Hi nmsinc,

Hmm.  Not really.  Maybe, you could copy the entire javascript for() { } block and change the .val to .text in that block, so it would be doing one for() block after another.  But you'll need to do some testing at that point to be sure it's all working as expected.  So either customize that plugin as needed, or creating custom code would be the path forward.

Hope that helps!

Dave Edis - Senior Developer
interactivetools.com