Refactor Custom Form Builder to Add support for galleries