Repeat steps disappear from steps in server actions. I’m trying to figure out some server actions with custom php files (using FPDF). However, every now and then, the steps from within my repeat just totally disappear in the steps overview, and I can’t edit them with the interface anymore. Inspecting a php file where this occurs doesn’t bring up any specific things. Two action files both with repeats steps look totally the same in VSCode, but not in the Wappler interface.
work with action file and fiddle around because you don’t know exactly how to use FPDF to create a batch of personalized pdf’s with dynamic data from your database
use repeat to do some stuff for every row in your database query
find out after a while that your repeat steps are gone
I attached two files in a zip. The file called create_multiple_pdf_copy.php has the steps visible in Wappler. The file called create_multiple_pdf_copy_copy.php has no steps visible in the repeat on my Wappler instance.
Any help is greatly appreciated.
ps: any advice on how to create a pdf for each row in my database using FPDF is also very welcome (I think I am almost there in the called create_multiple_pdf_copy_copy.php. I use this to open a custom php file that has the FPDF instructions to create the pdf. It works, but only for one row. Once I query more than one it doesn’t seem to create multiple files. (file names for created pdf’s in the FPDF php file are dynamically set to some name in the database rows).
5: add include server action step to repeat and select ‘fpdf_wappler_test_101’ from library. note: I added fpdf183 as a folder in the library to be able to use fpdf in the server actions. I’n not sure if this is the right way to go, it is the way I found. I added the file fpdf_wappler_test_101 php file as zip to this post.
7: get some error in browser. Despite error I do also get a generated pdf. Just one however, not 2 as to be expected since I have a paged query with a limit of 2 rows.
I can’t seem to add another repeat, as I get the message ‘You need to enter at least one step!’
Any help is greatly appreciated.
PS: once I get this FPDF running the way I need to (and understand how to use FPDF with Wappler much better), I plan on publishing an elaborate tutorial on how to create pdfs in Wappler to share with the community.