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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T02:56:13+00:00 2026-05-27T02:56:13+00:00

I have a simple ExtJS 4 (xtype form) inside a window. It has two

  • 0

I have a simple ExtJS 4 (xtype form) inside a window. It has two fields and a save button. One of the fields is a string. That works fine. If it’s blank, getValues() gives me the field blank. If it’s set, I get the value. However, the check box is different. If it’s checked, I get the value of ‘1’. HOWEVER, if I un-check the box (or do not check it), I get no value – the field is not listed in the result of getValues()! WHY??

items: [
                    {
                        xtype: 'checkbox',
                        name : 'insuranceVerified',
                        fieldLabel: 'insuranceVerified',
                        inputValue:'1',
                        value:'1'  //does not make a difference
                    },
                    {
                        xtype: 'textfield',
                        name : 'ru',
                        fieldLabel: 'ru'
                    }
]

I am catching the save button click event and calling this function in my controller:

updateEncounter: function(button) {
        console.log('clicked the Save button');
        var win    = button.up('window'),
            form   = win.down('form'),
            record = form.getRecord(),
            values = form.getValues();

// values properly shows the ru field on the form, but only shows insuranceVerified if it's checked - is not in values if it's unchecked... ??!

            debugger;
        record.set(values);
        this.getEncountersStore().sync();
        win.close();
    }

I just figured out something else, though it’s not a complete answer for me:
If I change the code above so it get’s the form (I assume from the form panel):

 form   = win.down('form').getForm(),   // instead of win.down('form')

Then, use getFieldValues() on that new object instead of the getValues(), I now have the check box value even if it’s un-checked.

values = form.getFieldValues();  // instead of getValues()

HOWEVER, the value I get back is ‘false’ (or true), not ‘0’ or ‘1’ like I specified with inputValue:’1′.

Also, I even tried setting a ‘value’ for the field ‘1’, no difference whether I do that or not for getValues or getFieldValues().

  • 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-27T02:56:13+00:00Added an answer on May 27, 2026 at 2:56 am

    Submit an HTML form with empty checkboxes

    What do you expect to receive if the checkbox isn’t selected? You specified the value being sent if it is checked..

    Here another solution:
    How come checkbox state is not always passed along to PHP script?

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

Sidebar

Related Questions

I have a simple Ext JS 4 form inside a window (MVC style app).
I have a simple ExtJS form, but I would like to add additional attributes
In ExtJS, say you have a simple editorgrid with two columns, X and Y,
I have a simple ExtJs form panel which contains a fileuploadfield. When I submit
I have a static html form layout where i add extjs form fields using
I have simple win service, that executes few tasks periodically. How should I pass
I have simple issue setting a two-way databinding of a checkbox in Silverlight 3.0.
I have simple form. <form target=_blank action=somescript.php method=Post id=simpleForm> <input type=hidden name=url value=http://...> <input
I have simple WinForms application where modifying Windows Registry. The problem is that in
I'm using extjs and just trying to solve a simple problem: I have 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.