32 Topics

Member Avatar for
Member Avatar for arunajasmine

Hi, i am having a query like [CODE]$report_attrid=$this->Report->find('all',array('conditions'=>array('Report.report_id'=>$report_id,'Report.user_id'=>$userId))); foreach($report_attrid as & $reportattrid): $reportattrid['Report']['attr']=$this->Attribute->find('all',array('fields'=>array('Attribute.id','Attribute.label'),'conditions'=>array('Attribute.id'=>$reportattrid['Report']['attribute_id'],'Attribute.form_id'=>$report_form_id),'order'=>'Attribute.sequence_no')); $reportattrid['Report']['value']=$this->Result->find('all',array('fields'=>array('Result.label','Result.value','Result.submitter_id','Result.submitter'),'conditions'=>array('Result.attribute_id'=>$reportattrid['Report']['attribute_id'],'Result.form_id'=>$report_form_id),'order'=>'Result.id')); endforeach; $this->set('Report_attrid',$report_attrid); [/CODE] 1.the first one for $report_attrid will gives me the all the datas needed for my report as id Report_id title form_id attribute_id 1 1 r1 24 69 2 1 r2 24 72 2.And …

Member Avatar for smartness
0
113
Member Avatar for arunajasmine

Hi, i am having Cakephp code like [CODE]<?php foreach ($viewfields as $r): if($r['Attribute']['type']=='radio') { ?> <script type="text/javascript"> jQuery.noConflict(); jQuery(document).ready(function($){ $("#"+<?=$r['Attribute']['id'];?>).each(function() { type= "<?=$r['Attribute']['type'];?>"; attribute_id="<?=$r['Attribute']['id'];?>"; if(type=="radio") { var ht = $.ajax({ type: "GET", url: "http://localhost/FormBuilder/index.php/forms/viewChoices/"+attribute_id, async: false }).responseText; var myObject = eval('(' + ht + ')'); var data = myObject;var j=0; …

0
119

The End.