placeholder for repeating group element?

earobins

Member
What is the correct way to use a placeholder for repeating group elements within an article?

I am using {fabrik view=element table=2 rowid=[rowid] element=tablename_3_repeat___group_presenter_fname repeat counter=X} but this always displays the first occurance of the the repeat group element. I am guessing the repeat counter is no longer valid since it shows the same data whether I include that or not. I have also tried a few other ways, but they didn't work either. Thank you!
 
Are you using repeatcounter, with no space? Your post above looks like you have it as two separate words. So this ...

Code:
{fabrik view=element table=2 rowid=[rowid] element=tablename_3_repeat___group_presenter_fname repeatcounter=all}

... should render all repeats, or ...

Code:
{fabrik view=element table=2 rowid=[rowid] element=tablename_3_repeat___group_presenter_fname repeatcounter=1}

... should render the first.

-- hugh
 
OK, works for me, with a counter. The 'all' option doesn't, though.

Code:
{fabrik view=element list=5 rowid=1 element=fab_cdd_test_40_repeat___state_repeat repeatcounter=1}

... gets me the second repeat (remembering that repeat counter starts at 0).
 
Thank you. That worked perfectly for the form I have embedded in an article. I tried it in my email template and it just displayed the field name as shown below (copied from the resulting email, not the template). Before I added the repeatcounter, the email would just display the last repeated group elements for all occurances. So if 3 copresenters were entered and the last was John Smith, his name/info would be displayed for all Co-presenters.

Summarized bio: bryan's short bio


No. Copresenters: 3

Copresenter1:
Name: {fab_applicant_3_repeat___group_presenter_fname repeatcounter=0} {fab_applicant_3_repeat___group_presenter_lname repeatcounter=0}
Email Address: {fab_applicant_3_repeat___group_presenter_email repeatcounter=0}
Phone Number: {fab_applicant_3_repeat___group_presenter_phone repeatcounter=0}
Biography: {fab_applicant_3_repeat___group_presenter_bio repeatcounter=0}

Summarized Biography: {fab_applicant_3_repeat___group_presenter_short_bio repeatcounter=0}
 
Ah, yeah, that trick only works for the content plugin.

We don't have a simple way of doing it for straight placeholders, and we won't even recognize it as an element placeholder if you try and put anything other than the element name in the braces. Although it *should* list all the repeated values, not just one.

If you need to start getting at individual repeat instances in a template, you'll need to use a PHP template, and access the form data structure directly.

Do you have any PHP skills / knowledge?

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top