Please help!
I want to update vatnumber after selecting client but don't work
... tests_controler.php
-----------------------
function update_input()
{
$xvalue = '123';
$this->set('xvalue', $xvalue);
$this->render('/tests/ajax_value','ajax');
}
... /tests/form_test.ctp
--------------------------
<?php echo $javascript->link('prototype', false); ?>
<?php
echo $form->input('client_id',
array('label' => 'Clients',
'options' => $clients,
'selected' => isset($this->data['Test']['client_id']) ? $this-
>data['Test']['client_id'] : ''));
echo $form->input('vatnumber',
array('label' => 'VAT',
'value' => isset($this->data['Test']['vatnumber']) ? $this-
>data['Test']['vatnumber'] : '' ));
$options = array('url' => 'update_value', 'update' =>
'TestVatnumber');
echo $ajax->observeField('TestClientId', $options );
?>
... /tests/ajax_value.ctp
--------------------------
<?php echo $xvalue; ?>
Check out the new CakePHP Questions site http://cakeqs.org and help others with
their CakePHP related questions.
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected] For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en