how do I display cakephp query result in editable form such that it is displayed in an input form for edit. The code below displays query result in a table
<?php foreach ($examination as $key => $exam): ?> <td><?php echo !empty($exam['ExamCalendar']['reg_exam_date']) ? date('d-m-Y', strtotime($exam['ExamCalendar']['reg_exam_date'])) : '--'; ?></td> <?php endforeach; ?>
Advertisement
Answer
resolved the issue using the below code
<table> <tr> <?php foreach ($examination as $key => $exam): ?> <td> <?php echo !empty($exam['ExamCalendar']['reg_exam_date']) ? $this->Form->input('Result Verification Status',['value'=>date('d-m-Y', strtotime($exam['ExamCalendar']['reg_exam_date']))]) : '--'; ?> </td> <?php endforeach; ?> </tr> </table>
This displays and input box with value from the query