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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T09:41:45+00:00 2026-05-27T09:41:45+00:00

I’d like to use forms generated by propel ( propel:generate-module –with-show –non-verbose-templates frontend user

  • 0

I’d like to use forms generated by propel

( propel:generate-module –with-show –non-verbose-templates frontend user users )

but I’d like do modify them a little bit. e.q. I’d like to remove fields that are foreign keys. Is it possible, or do I have to create my own forms?

EDIT

in file: project_name/lib/form/form_file.class.php there is an empty class which derives from some base class. If put there something like this:

$this->setWidgets(array(
      'name'    => new sfWidgetFormInput()
));

All the default fields disappear and there is only this ‘name’ field in the form, which is not what I’m looking for.

  • 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-27T09:41:45+00:00Added an answer on May 27, 2026 at 9:41 am

    If you are using admin generator as you indicated, you can edit your forms via a generator.yml file. With this file you can do any number of things include set which widgets you want to appear, order of entry, actions, etc.

    The generator.yml file is located in /apps/app_name/modules/module_name/config

    You can read more about it in the symfony docs.

    — Edit —

    If you are not using the generator.yml file, you can edit the form class directly, read this article relating to symfony forms for more info.

    Example widget manipulation:

    //-----
    //Remove Unwanted
    //-----
    unset(
        $this['created_at'],
        $this['updated_at'],
        $this['ingredient_list'] //Will be embedded due to extra meta data
    );
    //-----
    
    // Add a select menu using model to populate values
    $this->widgetSchema['state_list'] = new sfWidgetFormPropelChoice(array('model' => 'State', 'multiple' => true, 'order_by' => array('name', 'asc')));
    
    // Add matching validator
    $this->validatorSchema['state_list'] = new sfValidatorPropelChoice(array('model' => 'State', 'column' => 'id', 'multiple' => true));
    
    // I can also force widget presentation order
    $this->getWidgetSchema()->moveField('country_list', sfWidgetFormSchema::AFTER, 'state_list');
    
    // You can also add a callback function when the form is submitted
    $this->validatorSchema->setPostValidator(
        new sfValidatorCallback(array('callback' => array($this, 'dupeCheck')))
    );
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all’Everest What PHP function
I would like to count the length of a string with PHP. The string
For some reason, after submitting a string like this Jack’s Spindle from a text
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to understand how to use SyndicationItem to display feed which is
I've got a string that has curly quotes in it. I'd like to replace
I would like to run a str_replace or preg_replace which looks for certain words
I am trying to render a haml file in a javascript response like so:
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an ’ in it. SimpleXML turns this

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.