Solved

TextArea Parameter

Posted on 2014-04-07
1
213 Views
Last Modified: 2014-04-08
Given the following code:

form_tag ....
    text_area :val, params[:val]
    submit_tag...
end


Is there a way to change to

text_area :xx

but keep :val as the parameter that is passed to the backend?  That is, I want to change the id but the parameter name.
0
Comment
Question by:lcor
1 Comment
 
LVL 10

Accepted Solution

by:
Andrew Doades earned 500 total points
ID: 39983653
I think it's a matter of setting both the 'id' and 'name' parameters, but I can't remember which one is passed back to the controller. I think I've done this before on a form that had multiple fields using the same controller variables, but I can't find any examples now.
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Someone recently asked me about how to display a progress indicator on a page while an iframe is loading. And I remember when I first came across this myself. It was a bit tricky to get my head around, but really, it's very simple. The most impor…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now