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 7889537
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T06:07:30+00:00 2026-06-03T06:07:30+00:00

I have form $form, which have text field for each entity User . $form

  • 0

I have form $form, which have text field for each entity User.

    $form = $this->createFormBuilder();
    $form->add('users', 'collection');
    foreach ($query->getResult() as $user)
    {            
        $form->get('users')->add($user->getName(), 'text', array('data' => $user->getName()));
    }

I need to access specific input form by its ID number. So i have to be able to do something like this:

{{ form_widget(form.users[0]) }}

But it doesn’t work. I can’t use this:

{% for user in form.users %}

I need to access text fields specificly by their id’s

  • 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-03T06:07:31+00:00Added an answer on June 3, 2026 at 6:07 am

    Found the solution.

    {% set interator = form.users.iterator %}
    {{ interator.seek(0) }}
    {{ form_widget(interator.current) }}
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a form which users can add controls to and when they right
I have a form on which user is adding text fields as many as
I have a form in which i have a text box for email and
I have a form in which I have 30 input boxes and 10 text
I have the following text input on a budget calculator form which displays the
I have a form which users must fill out and submit. The controller action
I have a User entity that has a Current Location field (city and country).
I have a XAML input form which the user fills out. I want to
I have a form containing two text boxes for user input. Both text boxes
Hi I'm trying to add some another field to this php contact form I

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.