I have a list on my form and mapped some fields to it. If I click on an item from the list the fields are populated with the correct data (which you then can alter and update). This works fine.
I also have a new button on the form, this button clears the content of the fields so it is clear you are making a new item (also works).
However after I have cleared the fields and I press on a list item again the fields remain empty!
Can anyone help me with this?
This is the code I use to clear the fields:
$('[dsid="txtPhotoName"]').val('');
$('[dsid="txtPhotoDescription"]').val('');
localStorage.setItem('_photoID', 0);