I want to create some forms, but the forms will be different for different companies.
So It will have a main page with some images on of the different companies and then when they click on the image, It will take them to a form fit for that company.
So my question is am I better off creating a Company model for the company names and then a Form model for all of the forms and form data?
@cpytel Some forms require vehicle check information, some require engineer specifications and checks, and some require job instructions, and some require all of what I have just mentioned.
“vehicle check information, some require engineer specifications and checks, and some require job instructions”
@scott, I don’t know what any of these things are.
Do you have a user interface, wireframes, etc. that indicate what the actual functionality is? Ate they just text areas? Are they the same for all companies that require them? When you say “require” do you mean that it is just a validation difference, all companies have those fields but some require them and others don’t, or is it that they don’t have those fields at all.
@cpytel They are just text fields that will change to cater for the information needed. When I say require I mean that the company that the form has to be filled out for needs the information to process.
The employees all have iPads and they fill in these forms when they are on a job.
So they will fill in the form and submit it, and then the people in the office will print them off.
I haven’t started this yet so I don’t have any Models, before I started I wanted to know the best way to approach it.
So my thought was to have a Company Model that is linked to different forms, so I was going to call the other Model Form and have it submit there.
Ok, thanks for the details. Feel free to post a screenshot of the excel form.
It sounds to me like you don’t need multiple forms at all, but rather, one form that has a few fields hidden or shown (or included or not included) on it depending on the behavior of the company?
To me, this would be a JobSheet model (and corresponding form) which basis its behavior on the company that it is for.
Let me know if any of that is not clear or I’ve gotten something wrong.
@cpytel Oh right, so I’m still having the 2 models Company and Jobsheet, so I would just do belongs_to :company on the JobSheet model and has_one :job_sheet on the Company model?