Donate Share

Custom Form Elements

Subscribe

How to check element using link

  1. 2009-10-17 19:14:52 UTC

    The examples only show how to 'check all' elements. How can I use a link to check a single checkbox element.

  2. 2009-10-18 21:14:29 UTC

    One way to do so, is to set the property checked to true (="checked") and fire a change event:

    var el = $("idOfCheckbox");
    
    el.checked = true;
    el.fireEvent("change");
    

    another way could be to retrieve the instance of cfe from the original checkbox and call the check method

    $("idOfCheckbox").retrieve("cfe").check()
    

    Think of Custom Form Elements as a decolayer on top of the standard functionality of form elements, you may use the standard DOM methods or cfe methods either way

< Previous | 1 | Next >

Add a Reply

This forum does not allow anonymous participation.

Log in to add a reply. Not registered? Create an account to participate and receive email updates when replies are posted to this topic.