In order to make textfields of a form display values you need to add:
if (myForm.Elements.ContainsKey("/NeedAppearances")) {