Hide field function is not working