My problem seems relatively simple, if fieldB == "", then fieldB == fieldA.
Correct me if im wrong but in my case I would use beforesave(). When I click save I want to check if the textbox value for fieldB is empty. If so, set the textbox value of fieldA to the fieldB field. How do I reference the textbox value of those fields?