I need a form in which I will have so many checkboxes as rows in
table. I know how I can do that in normal php (code in my first post),
but I don't know how/should I do that using Symfony forms ? Do you
understand ? xD


On 28 Gru, 14:15, ScherlOMatic <stefan.scherbich...@gmail.com> wrote:
> Hi,
>
> maybe you could explain us a little bit more, cause I  couldn't
> imagine what you want to do.
>
> So please describe the scenario.
>
> On 28 Dez., 09:42, dziobacz <aaabbbcccda...@gmail.com> wrote:
>
> > I would like to approve comments clicking on checkboxes using AJAX
> > (without refreshing page).
> > Screen is here:http://forum.symfony-project.org/index.php/t/24537/
> > So as you can see above now I have checkboxes - each checkbox is a one
> > row from table - so I must write in view:
>
> > <form>
> > <?php
> >         foreach($comments as $c)
> >         {
> >                 echo "<input type='checkbox' name='comment' 
> > value='".$c->getId
> > ()."'";
> >                 if($c->getApproved() == 1) echo "checked='checked'";
> >                 echo " />";
> >                 echo $c->getComment();
> >         }
> > ?>
> > </form>
>
> > Is it the best solution ? Maybe I should create this form using
> > Symfony forms in catalog /form ? But in that case I will have to pass
> > $this->comments to Symfony form  and then create one checkbox per one
> > row using loop, so I don't know if it is possible in Symfony forms and
> > I don't know if I should in that case using Symfony forms ?

--

You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-us...@googlegroups.com.
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to