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

  • Home
  • SEARCH
  • 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 7029267
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T00:30:59+00:00 2026-05-28T00:30:59+00:00

I have successfully implemented Autocomplete field from database using sfWidgetFormJQueryAutocompleter but i cannot a

  • 0

I have successfully implemented Autocomplete field from database using sfWidgetFormJQueryAutocompleter but i cannot a find a way to insert a new value if the listed values are not required.

Everytime i submit a form with new value, it shows me “required” error. It is due to the reason that the auto-complete field has a different name then the form widget.

my widget configuration is

'city'                      => new sfWidgetFormJQueryAutocompleter(array(

                                    'url'   => url_for('trainingdetail/ajaxcity'),

                                    'config' => '{ width: 220,max: 5,highlight:false ,multiple: false,multipleSeparator: ",",scroll: true,scrollHeight: 300}'
))
  • 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-28T00:30:59+00:00Added an answer on May 28, 2026 at 12:30 am

    I thought there may be a more elegant way of doing this, but i solved it as follows.

    When using sfWidgetFormJqueryAutocompleter, the actual form field get replaced by another field from the widget and the original form field converts to a hidden field.

    I simply checked if the visible field has a value, and if yes, assigns the value to the hidden field which is the original form fields defined in form class.

    my sample code, triggers at form submit.

    <script type="text/javascript">
    $(document).submit(function cty(){
       if($('#autocomplete_trn_training_city').val().length>0)
        {
            $('#trn_training_city').val($('#autocomplete_trn_training_city').val());
        }
    });
    </script>
    

    here : #autocomplete_trn_training_city is the id of field generated by jquery widget
    and #trn_training_city is the id of original form field which is submitted to the database.

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

Sidebar

Related Questions

I have successfully implemented printing and print preview for my app using the PrintDocument,
I have successfully connected to an Oracle database (10g) from C# (Visual Studio 2008)
I have successfully implemented this method of using the Win32 API to set the
I have successfully implemented this from android to a java httpservlet on google app
I'm a complete noob to jquery and jquery ui but have successfully implemented a
On my new customer page , I have successfully implemented a jQuery show/hide toggle
This is my situation. I have successfully implemented logging to remote syslog using log4net.
I have successfully implemented my GridView now, but, as always, the whole ASP.NET life
i've followed the pagination tutorial from http://framework.zend.com/manual/en/zend.paginator.usage.html I have successfully implemented pagination for my
I just have a general question: has anyone successfully implemented a way to show

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.