Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8872009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T18:07:15+00:00 2026-06-14T18:07:15+00:00

I would like to display in my form a list of elements from the

  • 0

I would like to display in my form a list of elements from the entity. Near each element, it should be a delete button which will delete the specific element from the entty.

Do you know how I could do this?

Example: 3 entities: Person, Affiliation and PersonAffiliations. A person has 0 or many affiliations. Lets say I created 10 affiliations for the person and now I would like to delete one of them. How to create the form in order to display a list of all the affiliations for the specific person and near each affiliation display a small delete icon. When click on this icon, the affiliation should be deleted for this person.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T18:07:16+00:00Added an answer on June 14, 2026 at 6:07 pm

    You have to embed a collection of forms and use a lot of Javascript. It is in the Symfony2 Cookbook!

    Follow the example with the tags provided in the link above! Its easy, you have to put one anchor with the “remove” or “x” string per each sub-form to be removed and handle the deletion with Javascript.

    Form insertion is done by using the Prototype of the subform that you need to add, but seems you don’t need insertion.

    Notice that in your example you have to create an empty Person object and to add to it the list of predefined Affiliation object(s) such that the FormBuilder will be capable to render the forms related to Affiliation. Then you can delete the sub-forms with Javascript.
    Of course, it is in general better to define dedicated form types.


    If you only need to deselect a list of entities that are in relations with the main entity, then you can use the entity field type and you can render is as a list of checkboxes with the expanded option. Your controller will bind the entity and the related relationships and so it Symfony will cancel the precedeing relationships.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a ListBox on a WPF form. I would like to display a
What I would like to do is display the following in a form: Open
I would like to display a gallery of photos and how many times each
I have a list of soccer matches for which I'd like to display forms.
I would like to display items from a Queue in a Gridview in Windows
I would like to display a fancybox when a user clicks the Create button
I am building a long list of terms I would like to prevent from
Hi all i am having a list box on my Form which will display
I would like to display a loading bar before the entire page is loaded.
I would like to display only posts that are members of BOTH category 33,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.