Skip Navigation

[Resolved] Help with repeater field and buttons to display multiple documents

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 2 replies, has 1 voice.

Last updated by michaelR-26 3 days, 18 hours ago.

Assisted by: Minesh.

Author
Posts
#2823096

I want to be able to upload multiple PDFs related to a given product and create a button for each document I upload and have them all disply on the product page.

I have a custom repeater field (Product Data Sheets) attached to a custom post type (Antronix Products). I have been able to create the repeater field that content and a text field for the document title and a file upload field to get the document related the to document name.

Next I created a view I am not able to figure out how to use the document name as the button text. I added a button block in the View Template but I can find the option to use the PDF document name as I do not see it in the list of available sources.

Is there any documentation that you are following? No

Is there a similar example that we can see? No sure

What is the link to your site? hidden link

#2823169

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Can you please share admin access details and tell me what view you created and where exactly you want to display what.

Once I review your current structure I will be able to guide you in the right direction.

*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.

I have set the next reply to private which means only you and I have access to it.

#2823466

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I see you are using the following view:
- hidden link

Where this view you are using to display "Antronix Products" post type as well as repeating field group "Product Data Sheets" that is not correct.

To display repeating field group, you should set your view to query only repeating field group. I did that already. With your view's template, I've adjusted the code as given under:
=> hidden link

[types field="document-title"][/types]
<a href="[types field='product-data-sheet-url' output='raw'][/types] "> <button>[types field='document-title'][/types]</button></a>

More info:
- https://toolset.com/documentation/legacy-features/views-plugin/displaying-related-child-posts/#1-creating-a-view-that-lists-the-children-of-the-parent-post

#2823500

Thanks for your help. I will take a close look later to see how you fixed it.