zaterdag 12 oktober 2013

Check if a Multi Selectable Sharepoint Choice Field value is Checked.


I'm starting to write my own sharepoint helperclass with functions 
that can be called without knowing the ID's of the Sharepoint Fields, 
but by using the field Display Names. 

This function is to know if a certain value of a multi selectable 
choice field is checked or not.


// call the function
// CheckChoiceFieldValue ("DISPLAYNAME", 1) check of first value is checked
// CheckChoiceFieldValue ("DISPLAYNAME", 2) check of second value is checked
  
function CheckChoiceFieldValue(titel, index)
{
 var TD = $('nobr:contains("'+ titel + '")').closest("td").next("td").find('input');
    var bTD = false;
    if (index <= TD.length + 1)
    {
  return TD[index-1].checked;
 }
    return false;
}
 

Geen opmerkingen:

Een reactie posten