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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en.


Reply via email to