Skip to content

Instantly share code, notes, and snippets.

@lorenzo
Forked from mnithya/fill.ctp
Created November 24, 2015 09:26
Show Gist options
  • Save lorenzo/b5c7f2a4304fe8e22962 to your computer and use it in GitHub Desktop.
Save lorenzo/b5c7f2a4304fe8e22962 to your computer and use it in GitHub Desktop.
<div class="container">
<div class="form-group">
<?= $this->Form->create($assessmentForm) ?>
<fieldset>
<legend><?= __($assessmentForm->title) ?></legend>
<?php foreach ($questions as $k => $question): ?>
<?php echo $this->Form->hidden("$k.qid", ['value'=> $question->qid]) ?>
<?php echo $this->Form->input("$k.answer_text", ['label' => $question['text']]) ?>
<?php endforeach; ?>
</fieldset>
<?= $this->Form->button(__('Submit')); ?>
<?= $this->Form->end() ?>
</div>
</div>
~
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment