Simplify dynamic text button code.