Hi,
I recently was given a task to update our yiibooster extension.
The issue I’m having is that this tbform code no longer works in this version of yiibooster (the entire tbform functionality seems to have been removed)
$sessionForm = new SessionSelectionForm();
$items = $dataModel->getDynamicFormSessionsConfig($sessionForm);
// $form = TbForm::createForm(
// array(
// 'title' => 'Session Registration',
// 'enableClientValidation' => true,
// 'enableAjaxValidation' => false, // Just keep this to false
// 'layout' => TbHtml::FORM_LAYOUT_HORIZONTAL,
// 'elements' => $items,
// 'buttons' => array(
// 'reset' => array(
// 'type' => 'reset',
// 'label' => 'Reset',
// ),
// 'submit' => array(
// 'type' => 'submit',
// 'label' => 'Next',
// 'layoutType' => 'primary'
// ),
// // 'cancel' => array(
// // 'type' => 'submit',
// // 'label' => 'Cancel',
// // 'layoutType' => 'warning'
// // ),
// ),
// ), null, array(
// 'htmlOptions' => array('class' => 'well'),
// 'type' => 'horizontal',
// ), $sessionForm
// );
// return $form;
My guess to rebuilding the functionality for this would be but I’m getting no luck in having it actually work. (tbactiveform.0 is not defined)
$sessionForm = new SessionSelectionForm();
$items = $dataModel->getDynamicFormSessionsConfig($sessionForm);
$form = $this->beginWidget(
'booster.widgets.TbActiveForm',
array(
// 'title' => 'Session Registration',
'enableClientValidation' => true,
'enableAjaxValidation' => false, // Just keep this to false
// 'layout' => TbHtml::FORM_LAYOUT_HORIZONTAL,
'htmlOptions' => array(
'type' => 'horizontal',
'data' => $items,
),
null, $sessionForm
)
); // 'elements' => $items,
$this->widget(
'booster.widgets.TbButtonGroup',
array(
'buttons' => array(
array('label' => 'reset', 'buttonType' => 'reset'),
array('label' => 'next', 'buttonType' => 'submit'),
),
)
);
$this->endWidget();
return $form;