toggle nested template fields

edited September 2015 in Bug Reports
Hello!
I noticed that when in form fields use field with type toggler, it doesn't toggle fields with type template that have option 'repeatable' => TRUE
for example:
$fields['content'] = array( 'display_label' => TRUE, 'add_extra' => FALSE, 'init_display' => 'all', 'dblclick' => 'toggle', 'repeatable' => TRUE, 'type' => 'template', 'fields' => array( 'type'=>array('type' => 'toggler', 'label' => 'Type', 'prefix' => 'toggle_', 'options' => array('banner_text' => 'Banner + text', 'slider' => 'slider'), 'mode' => 'radios'), 'banner'=>array('type' => 'asset', 'class' => 'toggle toggle_banner_text'), 'slider'=>array( 'type'=>'template', 'class'=>'toggle toggle_slider', 'display_label' => false, 'label' => ' ', 'add_extra' => false, 'repeatable' => TRUE, 'init_display' => 'all', 'fields' => array( 'slide' => array('type' => 'asset', 'class' => 'toggle toggle_slider',), ), ) ) );
So, field 'banner' behaves as expected, but regardless of the selected option, field 'slider' is shown, is there a possibility to hide nested template filds with toggler field?

Comments

  • edited 5:30PM
    What version of FUEL are you running (you can find out in the fuel/modules/fuel/config/fuel_constants.php file at the top the FUEL_VERSION constant)?
  • edited September 2015
    Version 1.3
    I also noticed if add in nested template field with type hidden it works as it should!
    like so: 'fields' => array( 'slide' => array('type' => 'asset', 'class' => 'toggle toggle_slider',), 'hidden' => array('type' => 'hidden', 'class' => 'toggle toggle_slider'), ),
  • edited 5:30PM
    Can you try merging in the develop branch. It has some fixes that may help with that.
    https://github.com/daylightstudio/FUEL-CMS/tree/develop
Sign In or Register to comment.