Not sure how to title my entry, let me explain:

I need a list of discount codes that user has ever used. With an input on the registration page in case he wanted to enter discount code while registering. And of course the same input on the profile edit page, but with ability to add another code if desired.

So basically input must serve as an interface for entering and validating arbitrary number of codes.

I'm not sure how to solve it. Text input field creates just one to one relationship in the database. I need one to many. One profile, but many discount code entities...

I thought about creating content type with one text input, but how to place it in the registration form and display in user profile?

Comments

I would try to use Rules module for such a task. But I don't know if it's feasible.

Under user action Rules verifies some condition and performs an action as each step has a huge set of setup options.

Ok, I think I've found satisfying solution. Come to think of it, it's obvious - text input with unlimited values and some css formatting...