Fix main.js for multi-select fields and input fields.