Example #1
0
?>
 
                            <?php 
echo $form->error($model, 'of_bathrooms');
?>
                        </div>
                    </div>
                    
                    <div class="in-row clearfix">
                        <?php 
echo $form->labelEx($model, 'special_feature_json', array('class' => 'lb'));
?>
                        <div class="group-4 T_row_checkbox_step2">
                            <div>
                                <?php 
echo $form->checkboxList($model, 'special_feature_json', ProMasterSpecialFeatures::getDropdownList(), array('separator' => '', 'template' => '<div class="T_checkbox_list_step2">{input}{label}</div>'));
?>
                              
                            </div>

                        </div>
                        <div class="clearfix"></div>
                        <?php 
echo $form->error($model, 'special_feature_json', array('class' => 'class-error'));
?>
                    </div>
                    
                    
                    
                    <div class="in-row clearfix">
                        <?php 
Example #2
0
 protected static function parseSpecialFeature($dom)
 {
     $result = array();
     $list = ProMasterSpecialFeatures::getDropdownList();
     foreach ($dom->find('li') as $element) {
         $label = trim($element->plaintext);
         $value = array_search(strtolower($label), array_map('strtolower', $list));
         if ($value) {
             $result[] = $value;
         }
     }
     return json_encode($result);
 }