I’m trying to make a simple document management system with the repeater field. I need to print a button to download a Document attached to the the top repeater field. But if the top Repeater field is empty, it should print “not available” content.
I’m pretty new to PHP but this mostly works so far:
This prints a button to the attached file in the top repeater. The main problem is that it prints out a dead link if there is nothing in the top repeater. This won’t do. So I now want to add an else condition so that it prints some copy if there is nothing in the first repeater: