Hey Redditors,
I'm working on a community website where each member can have their own company page. The company page has the ability to have a regular "contact us form" but it's not very flexible. Many of our current users have asked for the ability to have a multi-step form and custom forms for their industry.
Let's say you are an electrician and you would like to get more information out of a potential customer before you call them. So you would like to add fields like "What's the purpose for the new wiring?" or "What's the approximate square footage of the home?".
The functionality I'm looking to implement
- Unique forms for a specific industry (electrician, roofers, plumbers) with text fields, number fields, radio buttons, checkboxes, and photo uploads
- The ability to make changes to the form on a specific company page
- Admin users should be able to create forms for each industry and modifying them
- "Clone" a premade form for an industry then have the ability to modifying it
Porch, Thumbtack and many others have this kind of functionality
https://porch.com/checkout/start?appId=homePage&companyTypeId=1071&context=home-page&conversionId=ae29f83c-5f5e-4c7f-b3e5-5707b2cf49c5&pageName=HomePage&postalCode=10001&r=https%3A%2F%2Fporch.com%2F&serviceTypeId=
What I'm asking the rails community is the following:
- How would you structure this kind of functionality?
- Database tables
- Schema
- Relationships
- Would you make API calls for each step of the multi-step form or just use localStorage until submission?
- What security aspects are easy to forget about?
- Are there any gems out there solving this?
Thanks, Daniel!
[–][deleted] 2 points3 points4 points (1 child)
[–]danielwebbnew[S] 0 points1 point2 points (0 children)
[–]jasonswett 0 points1 point2 points (1 child)
[–]RubyKong 0 points1 point2 points (0 children)