[html-formfu] Delete option in repeatable block does not work
Ascii King
tech at swattermatter.com
Thu Jan 22 15:06:15 GMT 2009
Carl Franks wrote:
> 2009/1/21 Ascii King <tech at swattermatter.com>:
>
>> I can't get the delete checkbox to function in my has_many repeatable block.
>> It has never worked in any of the test websites I have created. Here is the
>> code I use, though I have removed the extraneous bits.
>>
>> # ** REPEAT APPOINTMENTS --
>> - type: Repeatable
>> nested_name: appointments
>> counter_name: thecount
>> model_config:
>> new_empty_row_multi: appointment_date
>> delete_if_true: goAway
>> elements:
>>
>> - type: Hidden
>> name: appointment_id
>>
>> # APPOINTMENT DATE --
>> - type: Text
>> name: appointment_date
>> label: Appointment Date
>> model_config:
>> delete_if_empty: 1
>>
>> # DELETE APPOINTMENT --
>> - type: Checkbox
>> name: goAway
>> label: Delete
>>
>>
>> # THECOUNT --
>> - type: Hidden
>> name: thecount
>>
>> My has_many works properly except for this one thing. The "delete_if_empty:
>> 1" works as it is supposed to.
>>
>
> Looks like the docs need fixed.
> According to the test suite, "delete_if_true: 1" should be attached to
> the Checkbox's model_config, not the Repeatables.
>
> I really recommend checking the test suite if something's not working
> - as it's a lot more thorough than the docs.
>
> Carl
>
> _______________________________________________
> HTML-FormFu mailing list
> HTML-FormFu at lists.scsys.co.uk
> http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/html-formfu
>
>
Thanks. That fixed it. I couldn't find anything on the test suite
through Google though. Is that the SVN that people keep mentioning? Do I
use RapidSVN to access it and is there a link to an explanation on how
to use it?
More information about the HTML-FormFu
mailing list