Adding Multiple Inputs Into One Field

Hey Alex! I'm trying to convert the Etsy demo into a website like Odesk. How can I allow employers (instead of sellers) to be able to list the necessary skills (e.g. email marketing, css, html, mailchimp, etc...) and what level of skill (e.g. basic, advanced, professional, none). So it would go something like this: Enter Skills Required -> (in the field) enters "CSS" and next to it is Level Required: (drop-down) "Advanced". Then it would display beneath the field in a table form CSS Advanced and so on. Hopefully I made it clear. Thank you, Omar

Posted almost 5 years ago by Omar
Posted almost 5 years ago by Alex Yang

I think I know what you mean. That's not going to be easy to set up though, mainly because of the dynamic display that you want. The only way to get the fields to display on-demand like that is to use JavaScript - Ruby/Rails alone won't be able to achieve that. But I recommend building this layer-by-layer. First try to get the form to work and have data be saved into the database correctly. Once that's set up, you'll then be able to focus on the display feature. Give it a shot and let me know how it goes.

0
Posted almost 5 years ago by Omar

Thanks Alex, will do. Based on my research, I think they are called nested attributes and to incorporate something called AJAX.

0
Posted almost 5 years ago by Alex Yang

Yeah, you'll need AJAX/JavaScript to do this. Don't worry about that just yet though - get the functionality to work and then focus on the front-end.

0