krishna
krishna

Reputation: 28

Symfony setting value of specific checkbox from db?

I want to set checkbox to be checked for form rendered for specific value alone which i have retrieved from database. I can do it in jQuery, but is there any specific library functions in Symfony?

Suggestions please...

Upvotes: 1

Views: 332

Answers (1)

Pushparaj
Pushparaj

Reputation: 538

you can try this....

on showing the form in first you can also pass the value in form while setting

 $this->samplevariable = YOURFORM($this->getYOURMODEL->setYOURFORMFIELDNAME(array of values(1,2,3) which u get form db getYOURFORMFIELDNAME); 

Upvotes: 1

Related Questions