How to set default values (input field) in symfony 1.4 generated forms

I was trying to set default values for an input field.

public function executeNew(sfWebRequest $request)
{
$this->customer = Doctrine::getTable(‘Customer’)->find(array($request->getParameter(‘customer’)));
$this->forward404Unless($this->customer);
$this->form = new CallLogForm();
$this->form->setDefault(‘customer_id’,$request->getParameter(‘customer’));
}

This is the way to set hidden values of default values for an input field

$this->form->setDefault(‘customer_id’,$request->getParameter(‘customer’));

Filed Under: frameworkSymfony

Tags:

About the Author: me : yeay its me arun

RSSComments (0)

Trackback URL

Leave a Reply

Videos, Slideshows and Podcasts by Cincopa Wordpress Plugin