-
-
Notifications
You must be signed in to change notification settings - Fork 52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
text_area
method is not providing either id
or name
attributes
#32
Comments
Good find, would you be able to submit a PR? TIA |
Without looking into the code: shouldn't it be: form_for :event, "/events", class: "row" do |f|
f.text_area :notes, placeholder: "Some text here.", class: "form-control", rows: 6
end (Form builder passed as a block argument). |
@pascalbetz nope eg:
|
@joneslee85 yes, absolutely. You'll need to give me some time, though. My wife is in the hospital, it seems that my baby wants to be born any hour now. :) I'll be in touch. |
@josemota you are right, it should be like the example https://github.com/lotus/helpers#view-usage congrants for the baby! |
@joneslee85 i was referring to the first example at http://lotusrb.org/guides/helpers/forms/ but without checking the text below. Argh. @josemota : all the best! |
@joneslee85 @pascalbetz My baby's been born! She's growing steadily now in the incubator for some time. Until then, I'll be on the lookout but I'll try and squeeze in some time to work something out. Please bear with me :) |
I've found the cause of this bug. It seems that not passing any content while still passing other HTML options to the method will simply not register either text_area :notes, "forced content", rows: 1 # expected behavior is met
text_area :notes, rows: 1 # expected behavior is NOT met I recall there's a place in the code where both of these are handled so I'll dig deeper. I'll edit the initial message with this mention for better contextualization. |
The title is self-explanatory but here's my own example:
Code
Output
It is expected that the textarea has:
name
attribute with the value ofevent[notes]
;id
attribute with the value ofevent-note
.EDIT: The root cause of the bug is the inability to store both name and id when no content is passed in. Check the discourse
The text was updated successfully, but these errors were encountered: