Thread

inline_radio not working

November 12, 2017 7:13am

Subscribe [3]
  • #1 / Nov 12, 2017 7:13am

    Reinos

    74 posts

    It looks like the inline_radio does not respect the selected value in case the values are ‘0’ or ‘1’. When the value is a word like ‘test ’ it is working.

    See the example below.

    $vars['sections'] = array(
       array(
        array(
         'title' =>'_report_stats',
         'desc' => 'PHP & EE versions will be anonymously reported to help improve the product.',
         'fields' => array(
          'report_stats' => array(
           'type' => 'inline_radio',
           'value' => '0',
           'choices' => array(
            '1' => 'Yes',
            '0' => 'No'
           )
          )
         )
        ),
                  
       )
      );
    
      // Final view variables we need to render the form
      $vars += array(
       'base_url' => ee('CP/URL', 'cp/addons/settings/form'), //<-- load a template with this content: <?php $this->embed('ee:_shared/form')?> and some other html
       'cp_page_title' => lang('general_settings'),
       'save_btn_text' => 'btn_save_settings',
       'save_btn_text_working' => 'btn_saving',
       'alerts_name' => GMAPS_DATA_MAP.'_settings'
      );
    
      return $this->output('form', $vars, 'settings');
  • #2 / Nov 13, 2017 10:49am

    Kevin Cupp's avatar

    Kevin Cupp

    727 posts

    Yes looks like that’s the case, sorry about that! We’ll have a fix in the next release.

  • #3 / Nov 13, 2017 1:17pm

    Reinos

    74 posts

    Ok thanks!

ExpressionEngine News

#eecms, #events, #releases