add trim and convert for forms