Closed (fixed)
Project:
AHAH Forms Framework
Version:
5.x-1.5-5
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Nov 2008 at 14:31 UTC
Updated:
21 Jul 2009 at 21:53 UTC
I'm trying to add a subform on a form by using the dynamic_subform module. Hereţs the example:
function test_form() {
$form['some_text'] = array(
'#type' => 'textfield',
'#title' => t('Some text'),
);
$form['button'] = array(
'#type' => 'submit',
'#value' => t('Show subform'),
'#ahah_bindings' => array(
array(
'event' => 'click',
'wrapper' => 'subform_div',
'path' => 'subform/add',
),
),
);
$form['wrapper'] = array(
'#value' => '<div id="subform_div"></div>',
);
return $form;
}
function test_subform() {
$form['other_text'] = array(
'#type' => 'textfield',
'#title' => t('Other text'),
);
return $form;
}
function test_subform_add() {
$items = dynamic_subform_get_prepped('test_form', 'test_subform', NULL);
print theme('status_messages') . drupal_render($items);
}
Of course subform/add is handled by test_subform_add().
I got error:
No cached subform_build_id! : Can not find old cached args : Bad subform_id in args - vs test_subform
What is wrong in my implementation?
Thank you,
Claudiu
Comments
Comment #1
starbow commented