tomtom
tomtom

Reputation: 1190

Allow user to save certain items in HTML list to later edit (Ruby on Rails)

I'm trying to wrap my head around how to accomplish the following in my Rails project.

I'm trying to create a reusable template that users can create, edit, and save to be used later. The process is as follows:

  1. The user has a list of all possible things they could add into their template
  2. With the list of everything, I have a check box next to each item. If the user selects the checkbox, I want to save that item into their template (not edit the actual value of the item yet though)
  3. User selects multiple check boxes for the items they want, I then show them another page with a list of only the items they want included in their template. From there, they can edit the actual values and that data will be saved to my database.

Example: Step 1: Universe of Parameters:

Step 2: User "saves" the checked items, and sees the following only:


I'm not sure how to approach this. Is this an HTML solution? Is it JavaScript? Can I do it in Rails? Any help would be greatly appreciated

Upvotes: 0

Views: 147

Answers (1)

Rémi Delhaye
Rémi Delhaye

Reputation: 824

Everything will depend of where you want those data stored, if you want them on your database, you'll maybe use AJAX call to your Rails Controller, if you want them stored on your client browser, you both can use localstorage or cookies

Upvotes: 0

Related Questions