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:56, DEEPAK BHATIA <toreachdee...@gmail.com> wrote:
> I generally use remote function for the same.
>
> <?php echo checkbox_tag('selectdate', $currentdate, array('rich' => true,
> 'onchange'=> remote_function(array('update'  => 'common_area','url' =>
> 'home/homeselectdate','script' => true,'with'=>"'id='+this.value")))); ?>
>
> <?php echo checkbox_tag('option_a', 'yes', true, array('rich' => true,
> 'onchange'=> remote_function(array('update'  => 'common_area','url' =>
> 'home/homeselectdate','script' => true,'with'=>"'id='+this.value")))); ?>
>
> http://www.symfony-project.org/api/1_0/FormHelper
>
> On Mon, Dec 28, 2009 at 2:12 PM, 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<symfony-users%2bunsubscr...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/symfony-users?hl=en.
>
>

--

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