CMS MADE SIMPLE FORGE

CGBetterForms

 

[#11905] Radio button debug error

avatar
Created By: Gregor de Graaf (gregor)
Date Submitted: Sat Oct 06 08:18:21 -0400 2018

Assigned To: Robert Campbell (calguy1000)
Version: 1.7
CMSMS Version: 2.2.8
Severity: Major
Resolution: Fixed
State: Closed
Summary:
Radio button debug error
Detailed Description:
Using this form, was working in an earlier version of CGFB:
<div class="row">
<label><input class="radio-inline" type="radio" name="mailing"
value="inschrijven" data-cgbf-label='Inschrijven'
data-cgbf-selected={$form_data->mailing|default:'inschrijven'}>  
Inschrijven</label>
<label><input class="radio-inline" type="radio" name="mailing"
value="uitschrijven"/>   Uitschrijven</label>
    </div>

errors in:
Debug: (0.252318) - (net usage: 8640928) - (peak: 9083296)

test1 inschrijven - inschrijven


In doing a search on "test1", I got to the class.FormRenderer.php line 131:
Code:
$nodes = $this->getInputsByType('radio');
        if( $nodes ) {
            foreach( $nodes as $node ) {
                $tmp = $this->getAttributesArray( $node->attributes );
if( !($attr = $node->getAttribute('data-cgbf-selected')) )
continue;
debug_display('test1 '.$attr.' -
'.$node->getAttribute('value'));
if( $node->getAttribute('value') == $attr )
$node->setAttribute('checked','checked');
            }
        }



History

Comments
avatar
Date: 2018-10-07 15:15
Posted By: Robert Campbell (calguy1000)

fixed in svn
      
Updates

Updated: 2019-05-03 13:13
state: Open => Closed

Updated: 2018-10-07 15:15
resolution_id: => 7