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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T10:55:23+00:00 2026-05-25T10:55:23+00:00

I have a formpanel that is extended to make a class which is called

  • 0

I have a formpanel that is extended to make a class which is called from another file.
The setup works in that it is displayed correctly.

The issue I am facing is that I keep getting an error “this.getForm is not a function” in Firebug whenever I press the submit button.

The code I have was taken from a tutorial with the exact same setup as me so I do not understand why I keep getting this error.

SearchForm = Ext.extend(Ext.FormPanel, {
     id: 'myForm'
     ,title: 'Search Form'
     ,frame:true    
     ,waitMessage: 'Please wait.'          
     ,initComponent: function() {    
         var config = {                 
            items: [{
                layout:'column',
                items:[{
                    columnWidth:.3,
                    layout: 'form',
                    items: [{
                        xtype:'combo',                              
                        id: 'reportSelecCmb1',                              
                        hiddenName: 'ddi_country',                           
                        anchor:'98%',
                        store: dateStore,
                        displayField: 'name',
                        valueField: 'alpha2code',
                        selectOnFocus: true,
                        mode: 'local',
                        typeAhead: true,
                        editable: false,
                        triggerAction: 'all',
                        value: 'report_date',
                        listeners: {
                            select: {
                                fn:function(combo, value){
                                   myStore.load({params:{ddi_country: this.value}});
                                        }
                                    }  
                                }
                            }, 
                        ...
                }],
                buttons: [{
                    text: 'Submit',
                    id: "submitBtn",                    
                    handler: this.submit
                },{
                    text: 'Reset'
                }] 
            }]};

            // apply config
            Ext.apply(this, config);
            Ext.apply(this.initialConfig, config);

            SearchForm.superclass.initComponent.apply(this, arguments);      

        }

    ,submit : function(url, waitMsg) {
        this.getForm().submit({
            url: url
            ,scope: this
            ,waitMsg: waitMsg
            ,success: this.onSuccess
            //,failure: this.onFailure
        })
    }

    ,onSuccess: function(form, action) {    
        Ext.Msg.show({  
            title: 'Success'    
            ,msg: 'Success!'    
            ,modal: true    
            ,icon: Ext.Msg.INFO 
            ,buttons: Ext.Msg.OK    
        }); 
    }

});
  • 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-25T10:55:23+00:00Added an answer on May 25, 2026 at 10:55 am

    You have a scope problem with your button.

    Change your button definition to the following by adding the scope pointing at this:

    buttons: [{
        text: 'Submit',
        id: "submitBtn",                    
        handler: this.submit,
        scope: this
    },{
        text: 'Reset'
    }] 
    

    Hope it helps.

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

Sidebar

Related Questions

I have a FormPanel with 3 fields and a JsonReader. Here's the setup: var
I have a rather complicated setup which I have boiled down to the code
I have a windows form that executes a batch file. I want to transfer
I have a FormPanel that looks like this: var simple_form_left = new Ext.FormPanel({ frame:true,
I have a editable FormPanel that looks like this: I now want to display
I have an Ext.FormPanel which has a Save button which is supposed to do
In an Ext Js-application I am working on I have a formpanel that contains
I have the following form which intercepts the ENTER key so that when the
I have a fileUploader widget that I'm using to select an xml file. I
I have a FormPanel in GWT that should send a TextBox input to a

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.