Hi people,
I’m relativly new to the rails business so i have a rather noobish
question:
I have to create an app that has dynamic forms. That means, that I habe
about 10 Forms that all have a subset of attributes they share and some
that are unique to the type of form. Example:
Shared fields:
- created_at
- created_by
- customer_id
- current_state
- …
Fields needed in Form1
- healthinsurance_name
- healthinsurance_street
- …
Fields needed in Form2
- bank_name
- account_number
- …
So Form1 and Form2 share the fields created_at, etc.
Then I need to store values and define restrictions to the fields like
unique or things like if bank_name is set, account_number must be set
too.
I’m a little bit lost, how to begin with this stuff. I have been looking
at STI but I’m not sure whether ist’s what I need or not.
An optional feature would be to be able to define these dynamic forms
inside of the application.
So…any ideas?
thank you all!
Greetings,
Robotex