Jump to content

CakePHP $form->input()


244863

Recommended Posts

$options = array_flip(Set::extract('/QuestionnairePossibleAnswer/id', $question));

debug($options);

echo $form->input(

'QuestionnaireQuestionnaire.QuestionnaireAnswer.'.$count.'.possible_answer_id',

array(

'type' => 'radio',

'options' => $options,

'label' => false,

'legend' => false,

'before' => '<td class="radio">',

'after' => '</td>',

'separator' => '</td><td class="radio">',

'hiddenField' => false

)

);

 

$options =

Array

(

    [4ba8ab7d-9450-45e0-867e-1d7893974a26] => 0

    [4ba8ab92-ce20-443e-a23c-1d7893974a26] => 1

    [4ba8ab99-3684-4557-ae1e-151093974a26] => 2

    [4ba8aba1-6254-40be-932b-1d7893974a26] => 3

    [4ba8abab-b4bc-4209-9001-1d7893974a26] => 4

    [4ba8abb2-4f64-49d8-8735-1d7893974a26] => 5

)

 

Why when I view this do I get the 5 radio buttons with the numbers 0 -> 5 next to them as if they are labels???

 

<input type="radio" value="4ba8ab7d-9450-45e0-867e-1d7893974a26" id="QuestionnaireQuestionnaireQuestionnaireAnswer0PossibleAnswerId4ba8ab7d-9450-45e0-867e-1d7893974a26" name="data[QuestionnaireQuestionnaire][QuestionnaireAnswer][0][possible_answer_id]">0

 

Link to comment
https://forums.phpfreaks.com/topic/199138-cakephp-form-input/
Share on other sites

  • 2 weeks later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.