[html-formfu] Repeatable block will not save records

Ascii King tech at swattermatter.com
Tue Dec 30 19:41:55 GMT 2008


I have investigated and found that I can only save the first record in 
any has_many relationship. This is the same problem listed in this post 
http://lists.scsys.co.uk/pipermail/html-formfu/2008-February/000972.html

The answer there was to add the hidden count field, but that is not 
working for me. I had already tried that last night. Here is the .yml 
file I used.

   - type: Repeatable
     nested_name: appointments
     model_config:
         new_empty_row: appointment_date

     element:
       - type: Hidden
         name: appointment_id

       - type: Text
         name: appointment_date
         label: Appointment Date

   - type: Hidden
     name: count

   - type: Submit
     name: submit
     value: Submit

I can save changes only to the first returned, repeatable row, even 
though all of the rows populate properly.
I know this is probably a simple mistake I am making, but it is beyond 
me what it might be. Please help.



More information about the HTML-FormFu mailing list