1. Fabrik 3.9 has been released. If you have updated Joomla to 3.9, this is a required update.
    Dismiss Notice

Select a radio / checkbox in JS

Aug 5, 2013
Select a radio / checkbox in JS
  • Code (Javascript):
    // get the div that contains the checkboxes
    // this div is the element which uses the elemnent's full name as its id.
    var div = $('tablename___elementname');
    //get its checkboxes
    var inputs = div.getElements('input[type=checkbox]');
    //or to get radiobuttons
    var inputs = div.getElements('input[type=radio]');
    //access a specific input and see if its checked or not
        alert('the first input is checked')
    } else {
        alert('the first input in not checked');