Version 2.60 and Show/Hide Dependent Fields PLUS

15 posts by 4 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: March 23, 2014   (RSS)

By nmsinc - March 8, 2014

Just upgraded to CMS v2.60 and tried using Show/Hide Dependent Fields PLUS with no luck.

Anyone having this issue?

Thanks - nmsinc

nmsinc

By nmsinc - March 10, 2014

Thanks Dave

nmsinc

By soylent17 - March 10, 2014

I have uploaded an update that should work with the new version of CMS Builder.  Once approved, the updated plugin version will be 0.93. 

By Dave - March 10, 2014

Thanks Cy!

nmsinc, 0.93 is live here: http://www.interactivetools.com/add-ons/showhide-dependent-fields-plus/

Dave Edis - Senior Developer
interactivetools.com

By nmsinc - March 10, 2014

Sorry - still does not work !

nmsinc

By soylent17 - March 11, 2014

  • Your browser may be caching the old version.  Do a full refresh (Shift + F5) on the page and see if that fixes it.  
  • Did you overwrite your config file?  If you overwrite your config file with the newly downloaded one, your customizations will be lost.  
  • You may need to go back into the Plugins menu and re-enable the plugin after upgrading.
  • What web browser are you using?  Are you getting a script error?
  • If none of these things resolve the issue, do you have a live site I can look at?

On a side note, I've updated the code again (v0.94) to ensure config files don't get overridden when upgrading in the future.

By nmsinc - March 11, 2014

Hi soylent17,

Did everything as you suggested and still no luck. The site is protected and is under license so giving access is out of the question. I will however give a quick look at how I'm using your suggested code below. Also, Much of the CMS section uses MySQL query -can this be an issue?

<?php if(!isset($shdfpIncluded)) die('Restricted Access');

// refer to instructions.txt for detailed instructions and examples

$fields = array(

        // enter your rule sets here //

  
     'claims_submission' => array(                        // the name of the section to which this rule set applies
           'claim_status' => array(                             // the name of the field that changes
                '_none_'       => array(),                      // show these fields when nothing is selected
    'Other'        => array('status_other'),        // show these fields when a value not listed below is selected
    '_any_value_'  => array(),                      // show these fields when the value of eventFieldName is any value
   ),
  ),
  
  // enter your rule sets here //
  
  'claims_submission'  => array(
  'member_company' => array(
    '_none_'       => array('other_insurance', 'insurance_representative', 'other_address_1', 'other_address_2', 'other_city', 'other_state', 'other_zip_code', 'other_phone_number', 'insurance_company_email', 'auto_email_insurance_company'),
    '_any_value_'  => array('insurance_representative', 'insurance_dispatcher', 'insurance_processor', 'insurance_adjuster', 'insurance_agent'),
   ),
  ),

);

$devmode = false;

?>

nmsinc

By soylent17 - March 12, 2014 - edited: March 12, 2014

You have the table defined twice, which will break the code.  Here is how you need it:

<?php if(!isset($shdfpIncluded)) die('Restricted Access');

// refer to readme.txt for detailed instructions and examples

$fields = array(
  
  'claims_submission' => array(
  
    'claim_status' => array(
      '_none_'       => array(),
      'Other'        => array('status_other'),
      '_any_value_'  => array(),
    ),
    
    'member_company' => array(
      '_none_'       => array('other_insurance', 'insurance_representative', 'other_address_1', 'other_address_2', 'other_city', 'other_state', 'other_zip_code', 'other_phone_number', 'insurance_company_email', 'auto_email_insurance_company'),
      '_any_value_'  => array('insurance_representative', 'insurance_dispatcher', 'insurance_processor', 'insurance_adjuster', 'insurance_agent'),
    ),
    
  ),

);

$devmode = false;

?>

If it helps, you can write it this way instead:

<?php if(!isset($shdfpIncluded)) die('Restricted Access');

// refer to readme.txt for detailed instructions and examples

$fields = array(); // only necessary if pre v0.94

$fields['claims_submission']['claim_status'] = array(
  '_none_'      => array(),
  'Other'       => array('status_other'),
  '_any_value_' => array(),
);

$fields['claims_submission']['member_company'] = array(
  '_none_'      => array('other_insurance', 'insurance_representative', 'other_address_1', 'other_address_2', 'other_city', 'other_state', 'other_zip_code', 'other_phone_number', 'insurance_company_email', 'auto_email_insurance_company'),
  '_any_value_' => array('insurance_representative', 'insurance_dispatcher', 'insurance_processor', 'insurance_adjuster', 'insurance_agent'),
);

$devmode = false;

?>

I'm thinking the second way will be the easiest for people to understand, so I'll likely change the examples to resemble this in a future release.

By nmsinc - March 12, 2014

Thanks for the help - nice job on this plugin by the way - everything works just great!

nmsinc

nmsinc