Trying to give a textarea some default text using the formtastic rails helper. I can’t use value like on other inputs, so how can I make this happen?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I think this might be a limitation or missing feature in Formtastic. For inputs like
:stringyou can do:input_html => { :value => 'whatever' }, but the “value” of atextareaisn’t set with a HTML attribute.Give that a try (we pass the
:input_htmloptions down to built-in Rails helpers, and maybe they’ll do the right thing), otherwise, please submit an issue or a pull request on Github.