fix #1939 and fieldtype javasript options #1782