Defined the function for getting/setting the text fields.