Results 1 to 2 of 2

Thread: Radio Button Group

  1. #1

    Default Radio Button Group

    I have a radio button group with just 2 radio buttons. I need to update the value of the radio buttons using submitted information in the database. How do i set the value of the radio buttons. By value in this case i mean the checked state.Thank you.

  2. #2
    Sencha User
    Join Date
    Dec 2009
    Posts
    425

    Default

    your form will have:
    Code:
    {
    xtype: 'radiogroup',
    id: 'frequency',
    items:
    [
    {boxLabel: 'Option 1', name: 'frequency', inputValue: 1, checked: true},
    {boxLabel: 'Option 2', name: 'frequency', inputValue: 2}
    ] 
    }
    
    After the form is rendered, do
    form.findField('frequency').setValue(record.data.frequency);

    Your record should have frequency defined as..
    {name:
    'frequency', type: 'int'}

Similar Threads

  1. Disable radio button in radio group
    By dancas in forum Ext 2.x: Help & Discussion
    Replies: 4
    Last Post: 19 Jul 2017, 11:37 PM
  2. Radio Button group with buttons
    By Chielus in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 29 Jan 2012, 12:17 PM
  3. How to iterate Radio button group?
    By locutusUT in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 25 Mar 2010, 8:15 AM
  4. Vertical Radio Button Group
    By gtg489w in forum Ext GWT: Help & Discussion (1.x)
    Replies: 2
    Last Post: 27 Jan 2009, 3:34 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •