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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T13:49:31+00:00 2026-05-30T13:49:31+00:00

i created a customFormtype in symfony2 and i’m using it in a formbuilder in

  • 0

i created a customFormtype in symfony2 and i’m using it in a formbuilder in my controller.
This is the html result when i render the form:

        <div id="form">
              <input type="hidden" id="form__token" name="form[_token]" value="2e8fe0d777b5c0d7d30d9bfd9d5143811c790b1d">
              <div>
                 <label class=" required">Stars</label>
                 <!-- some other stuff -->
              </div>
        </div>

Where does the id form came from and where can i change the name?
Thank you very much.

  • 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-05-30T13:49:33+00:00Added an answer on May 30, 2026 at 1:49 pm

    The id of the form is defined by the getName() function

    class TaskType extends AbstractType
    {
        public function buildForm(FormBuilder $builder, array $options)
        {
            $builder->add('task');
            $builder->add('dueDate', null, array('widget' => 'single_text'));
        }
    
        public function getName()
        {
            return 'task';
        }
    }
    

    Ex. ‘task’ here. (http://symfony.com/doc/current/book/forms.html#creating-form-classes)

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

Sidebar

Related Questions

I created the register form in asp.net. And I want to validate Name. This
Created a views.py method to get the data posted from an html form. As
Created a very simple HTML/CSS drop down navigation using nested unordered lists. Works great
I created a content type which has some fields and i want this fields
I created a program using dev-cpp and wxwidgets which solves a puzzle. The user
I created a few mediawiki custom tags, using the guide found here http://www.mediawiki.org/wiki/Manual:Tag_extensions I
I created a new SharePoint portal for testing purposes using a manually added HOSTS
Created an Accordion side bar using jQuery 1.2.6. I cannot access newer version of
Created basic C++ DLL and exported names using Module Definition file (MyDLL.def). After compilation
Created using Sphinx 0.6.5. I know Python's documentation uses reStructuredText , but it has

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.