If we use form_for
for a record, all input tags inside the form tag will automatically contain an attribute id
with value like id="post_3_title"
, id="post_3_content"
.
In my case, I want to get those names to create javascript codes dynamically. I wonder if there is any way to do this. Any ideas?
Thanks for your helping.