StratusForms
StratusForms copied to clipboard
Repeating Row -list dependencys
So not a problem, but a solution. For a form where I have repeating rows I had two select list with one depending on the other. Easy right, except that each row you have to add the variable to the name.
So in the parent list for the on change event : onchange="functionName(this.value, this.id)"
Then in the function: function functionName(val, id) { // This list will strip the the field name and leave repeatrow ID '0sfrepeat0(Num)' or nothing if first row var lID = id.substring(4); //$("#SUB_LISTT"+lID) then we add the repeatrow ID to the 2nd list $("#SUB_LISTT"+lID).StratusFormsLoadChildDDL({ parentID: val, //ID parent item parentField: "UNIT", //internal name of parent field on child list listName: "LU_SUB", //child list name firstOptionText: "Please Select", fieldName: "Title", //field in child list to show in drop down orderByField: "Title" //which field to orderby on the child list });
}