AnsweredAssumed Answered

Updating checkbox in a checkbox group doesn't work

Question asked by vpsylim on Aug 4, 2015
Latest reply on Aug 4, 2015 by vpsylim

So here's what I'm trying to do - the edit form is launched after uploading a document. The user then gets to select a library from a drop down list. After clicking a "Refresh" button, I pull back all documents in that library based on certain criteria and fills a drop down list with all the document titles. The user then selects a title from the list and the document's metadata is then pulled from the library and filled into the current form.


I have a clearFields function which just clears all the current form's fields back to an empty state. This is so if the user selects the wrong document title and selects another, it'll only have the proper metadata fields. In this function, I have a loop that goes thru a checkbox group and sets everything to false so they won't be checked.


The problem - after the loop marks all the checkboxes' value to false, when I try to go thru the checkbox group again to mark certain items as true (based on metadata of the selected document), the checkboxes will never get updated to be marked as checked. If I remove the portion of the code where I switch the attribute checked to false, it works no problem. But then I have the possibility of having invalid fields checked because of previous metadata selected.