Form helpers are methods to aid in the creation of HTML forms. For example, this will create a text field with the name 'foo':
Offline
Sweet--thanks for this tutorial. more tutorials which cover some more clarification on the basics like this help me a lot. I've found there arent much basic tutorials like this which specifically define each function and its inherited components. thanks!
Offline
Thanks for this! I've been trying for ages to figure out what I was doing wrong, I was using text_field_tag and expecting it to work like text_field.
// noob mistake
Offline
Thanks for the nice tutorial, there are so many tutorials out there that it's easy to get overwhelmed and your short precise tutorial on this tag makes it easy to digest.
I have a table called leads with the following columns: firstname, lastname, email, phone, and company_id
company_id refers to a belongs_to and has_many relationship in a table called companies. The companies table has only one column, name.
I'm having difficulty using the <%= text_field :lead :company.name =%>
I'm a newbie, why does this not work?
Offline
how do i create a set of text fields referring to the same model?I want all of these field value to be sent as an array.
Offline
I have just written a useful printable PDF cheatsheet for Rails' form helpers
Offline