Two pictures. Problem take a look down under.


I do have the following code in my template – thanks a lot again to j0k:
<div id="listdiv">
echo jq_form_remote_tag(array(
'update' => 'listdiv',
'url' => 'shoppinglist/update',
'loading' => jq_visual_effect('fadeIn', '#indicator'),
'complete' => jq_visual_effect('fadeOut', '#indicator'),
));
</form>
</div>
When I type “apple” in the empty field and submit the form (first picture), everything will be saved in the db correctly. The result ist picture two. But the new field doesn’t show up. Any idea?
If I do a full refresh, tomato, apple and a new text field is showing up correctly!
I switched off all if-method-GET/POST statements in action.class.php. Does anybody have an idea?
Update
action.class.php
public function executeIndex(sfWebRequest $request) {
$endkunde_id = $this->getUser()->getAttribute('id');
$zustand_id = 1;
$list_id = 252;
$shopname_id = 1;
$shopname = 'shop 1';
// if ($this->getRequest()->getMethod() == sfRequest::GET) {
$this->form = new YourListForm(array(), array('endkunde_id' => $endkunde_id, 'list_id' => $list_id));
$this->form2 = new AddOnYourListForm(array('shopname' => $shopname), array('endkunde_id' => $endkunde_id, 'list_id' => $list_id, 'shopname_id' => $shopname_id));
// }
}
public function executeUpdate(sfWebRequest $request) {
$endkunde_id = $this->getUser()->getAttribute('id');
$zustand_id = 1;
$list_id = 252;
$shopname_id = 1;
$shopname = 'shop 1';
$this->addon_listForm = new AddOnYourListForm();
$addonlist = array();
$p = 'addon_list_id_';
$q = (string) 252;
$p .= $q;
$this->addon_listForm->bind($request->getParameter($p));
if ($this->addon_listForm->isValid()) {
$formData = $this->addon_listForm->getValues();
// $this->addon_listForm->save();
}
$this->form = new YourListForm(array(), array('list_id' => $list_id, 'endkunde_id' => $endkunde_id));
$p = 'yourlist_';
$q = (string) 252;
$p .=$q;
$this->form->bind($request->getParameter($p));
if ($this->form->isValid()) {
$this->form->save();
$this->form = new YourListForm(array(), array('list_id' => $list_id, 'endkunde_id' => $endkunde_id));
}
}
I got one solution:
Short explanation:
action.class.php: