Form Observers

Hi Fred,

Fred wrote:

Can anyone help me with this form observer?

I have a form in my page <%= " <form id='notes_#{id}'> <input type='text' id='monday_#{id}' name='monday' value=''><br> ..... <input type='text' id='sunday_#{id}' name='sunday' value=''><br> </form> " %>

I'm pretty sure that by hard-coding your html here, you're not letting Rails know what it needs to know to generate the code you need from the observe_form method. I'd recommend you consult the form_tag, text_field, etc. methods at api.rubyonrails.org. Also, a scaffolded app in yousandbox would probably provide some good stuff to get your arms around how things work.

hth, Bill

hth, Bill

Hi Fred,

Fred wrote:

Thanks for the help Bill.

You're welcome.

I switched the tags to use the ruby code, which http://www-128.ibm.com/developerworks/web/library/x-introajaxrails/index.html has an example of using an observer as well.

Glad you got it working. And thanks for providing the link. I'm sure that'll save somebody else time in the future.

Best regards, Bill