Repurposed FormatTextField to be more generic