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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T06:21:14+00:00 2026-06-07T06:21:14+00:00

Say we have a yui3 form: YUI().use("gallery-form", function (Y) { var checkbox = new

  • 0

Say we have a yui3 form:

YUI().use("gallery-form", function (Y) {
var checkbox = new Y.CheckboxField({
    name : "myCheckbox",
    value : "check",
    label : "Test Checkbox"
});

var f = new Y.Form({
    boundingBox: '#form',
    action : 'test.php',
    method : 'post',
    children : [
        checkbox ,
        {name : 'submitBtn', type : 'SubmitButton', value : 'Submit'}
    ]
});

f.render();
});

I.e. form has a lot of checkboxes; I would like every checkboxes on this form to onchange="fn(this)".
Here’s a small example of what i need.

NB. checkbox in the second line shouldn’t be modify. I’m looking for something like:

form.all('input type=checkbox').on('change', fn(checkbox));

_

// where fn is:
function fn(el){ console.log(el.checked); }
  • 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-06-07T06:21:16+00:00Added an answer on June 7, 2026 at 6:21 am

    This one is kind of criptic. I think the expected way is to do form.on('*:change', fn) and filter the event propagation, but I can’t find a way to avoid duplicate calls to the callback.

    So you can resort to the Form’s change UI event and do:

    form.on('change', function (e) {
      var checkbox = e.domEvent.target;
      console.log(checkbox.get('checked'));
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Say I have a LINQ-to-XML query that generates an anonymous type like this: var
Say I have the following template function: template <class T> void apply(const vector<complex<T> >&
Say I have an Intent like this: Intent intent = new Intent(context, MyActivity.class); I
Say I have an HTML form like this to collect an email from a
Say I have a public method1 calling a private method2 , I use a
Say I have a function pointer in C- library int (*fptr)(void); And I have
Say have the following code: public void SaveOrUpdate(OrderContract orderContract) { foreach (var orderContract in
Say we have the following method: private MyObject foo = new MyObject(); // and
Say I have this html: <table> <tr> <th>Sort Order</th> <th>Name</th> </tr> <tr class=item id=item_1>
Say I have two type of actors: Master and Slave I dispatch new Jobs

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.