fieldnames error when input is empty for ajax data pages