uses in reset action

    $this->data['Post']['body'] = '';
    $this->data['Post']['title'] = '';
hope it will work


On Thu, Jul 16, 2009 at 2:36 PM, Dhileepen Chakravarthy <
[email protected]> wrote:

> Hi Everybody,
>
> I want to know how to show the form with reset or clear and submit button.
> reset to clear all form values , submit to submit the form.how do i do in
> cakephp, i can able to show the buttons like
>
> <!-- File: /app/views/posts/add.ctp -->
>
> <h1>Add Post</h1>
> <?php
> echo $form->create('Post');
> echo $form->input('title');
> echo $form->input('body', array('rows' => '3'));
> echo $form->submit('Save Post');
> echo $form->button('Reset', array('type'=>'reset'));
> echo $form->end();
> ?>
>
> but how do i assign the clear taks to that reset button
>
> Regards,
> Dhileepen
>
> >
>


-- 
Best Regard

Amjad Farooq
Web developer
Bramerz (Pvt)Ltd.
00923214239682

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to