Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-04-01 Thread Ascii King
That's great, thanks. That's almost exactly what I had except I had put brackets on the end of the get_elements, so I couldn't get it to work. Carl Franks wrote: 2009/3/31 Ascii King : That works great! Thank you. How do I count the number of elements returned by the get_all_element funct

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-04-01 Thread Carl Franks
2009/3/31 Ascii King : > That works great! Thank you.  How do I count the number of elements returned > by the get_all_element function? > > $form->get_all_element({ type => Repeatable }) > > If I display the variable, I can see that I get four elements, but I don't > know how to count them with co

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-31 Thread Ascii King
That works great! Thank you. How do I count the number of elements returned by the get_all_element function? $form->get_all_element({ type => Repeatable }) If I display the variable, I can see that I get four elements, but I don't know how to count them with code. Carl Franks wrote: 2009/3

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-31 Thread Carl Franks
2009/3/30 Ascii King : >> I suspect what's happening here is that the rep blocks aren't getting >> the 'name' copied over. >> If you use Data::Dumper, you should be able to confirm that. >> If that's the case, could you commit a fix? >> >> Cheers, >> Carl >> > > So, I'm not  a great programmer, bu

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-30 Thread Ascii King
I should have realised from the name 'repeat_chunk' that you were searching for a Block, not a field. Yes, you need: get_all_element() See? I'm not lazy. Just dumb. ;) I suspect what's happening here is that the rep blocks aren't getting the 'name' copied over. If you use Data::Dumper

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-27 Thread Carl Franks
2009/3/26 Ascii King : > I read the documentation. I swear! :) > Will the get_field function grab a div tag? I can't get it to, even if the > tag is not in a repeatable element. The div tag I want is buried in some > fieldsets, so do I need to use 'get_all_element'? > > Truthfully I've tried every

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Ascii King
I read the documentation. I swear! :) Will the get_field function grab a div tag? I can't get it to, even if the tag is not in a repeatable element. The div tag I want is buried in some fieldsets, so do I need to use 'get_all_element'? Truthfully I've tried every combination and I can only get

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Carl Franks
2009/3/26 Ascii King : > Thanks for your help so far. I have the first-child working but it isn't > exactly what I need. I have some javascript code that allows me to > dynamically add rows to repeatable elements. However, it refers to the rows > by classname and id. I need to be able to make the f

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Ascii King
Thanks for your help so far. I have the first-child working but it isn't exactly what I need. I have some javascript code that allows me to dynamically add rows to repeatable elements. However, it refers to the rows by classname and id. I need to be able to make the first or last row in the rep

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Carl Franks
2009/3/26 Ascii King : > I believe the output of a Repeatable is wrapped in div tag. I use the > following code to generate a div tag. > >   - type: Repeatable >     nested_name: appointments >     counter_name: appointment_count >     attributes: >       class: ShawnTest >       id: appointment_co

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Ascii King
I believe the output of a Repeatable is wrapped in div tag. I use the following code to generate a div tag. - type: Repeatable nested_name: appointments counter_name: appointment_count attributes: class: ShawnTest id: appointment_count elements: This outputs

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Carl Franks
2009/3/26 Ascii King : > I apologize for asking this twice, but I have not yet solved it. > Is it possible to specify a different characteristic for the first record in > a repeatable? I would like the class in the first repeatable block to be > different from the rest of the class tags. Something

Re: [html-formfu] Different attributes for the first record in a repeatable block

2009-03-26 Thread Carl Franks
2009/3/26 Ascii King : > I apologize for asking this twice, but I have not yet solved it. > Is it possible to specify a different characteristic for the first record in > a repeatable? I would like the class in the first repeatable block to be > different from the rest of the class tags. Something