title: Display a user form by categories of "questions" in Symfony
body: <p>Using Symfony, I'm building a budgeting app which allows each user to access a table of their expenses, and edit it.</p>
  <p>So in short, it displays a <code>&lt;form&gt;</code> using Symfony formTypes inside the cells of a <code>&lt;table&gt;</code> where each line represents a particular kind of expense.</p>
  <p><a href="https://i.stack.imgur.com/T26hv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/T26hv.png" alt="The form" /></a></p>
  <p>So I have a user table/entity and a expenseLine table/entity, linked by a OneToOne relation, and that allows me to call up all of a user's expense lines and edit it.</p>
  <p>It works fine so far, but each kind of expense has a category (stored in an other table with a OneToMany relation), and I would like to display the budget lines by categories.</p>
  <p>So far, I haven't been able to work up the logic of how to do that. I managed to display the category of each user's expense, but not display the user's expenses by category (without displaying those of the other users).</p>
  <p>And I wonder how I should imbricate the formTypes so that I don't only display it but allow for modifications with the same display.</p>
  <p>Could anyone point me toward the right direction?</p>
  <p>EDIT:</p>
  <p>The formType:</p>
  <pre class="lang-php prettyprint-override"><code>&lt;?php
  
  namespace App\Form;
  
  use App\Entity\User;
  use App\Entity\LineCategory;
  use App\Form\BudgetLineType;
  use Symfony\Component\Form\AbstractType;
  use Symfony\Component\Form\FormBuilderInterface;
  use Symfony\Component\OptionsResolver\OptionsResolver;
  use Symfony\Component\Form\Extension\Core\Type\CollectionType;
  
  class MakeUserTableType extends AbstractType
  {
      public function buildForm(FormBuilderInterface $builder, array $options)
      {
  
          $builder-&gt;add('BudgetTable', CollectionType::class, [
              'entry_type' =&gt; BudgetLineType::class,
              'entry_options' =&gt; ['label' =&gt; false]]);
          
      }
  
      public function configureOptions(OptionsResolver $resolver)
      {
          $resolver-&gt;setDefaults([
              'data_class' =&gt; User::class,
          ]);
      }
  }
  </code></pre>