My current perl script gbook.pl allows the user to append one gbF() per submit.
This page and perl script: gbook_multi.pl appends more than one gbF() per submit. It is not possible to send an array of objects to the perl script. The perl script only gets name=value pairs. Therefore to send an array of objects, you need to structure the name to have a prefix and name. In this case, the prefix is the array_index so the page form has to have fieldnames where the input fields are named prefix_name.
gbook_multi.pl addes a separate entry for each sub form. The fields for each sub form must be named
gbook_multi.pl stores all the name=value pairs in an associative array. It also stores the prefixes in an associative array. When it writes the gbF() functions, it itterates through the sorted prefixes and writes a gbF() for each prefix.
This form has a standard set of userfield1..userfield2,comments and a set of dynamically generated fields, and a set of dynamically generated fields. these are named pre10N_userfield1..pre10N_userfield2,pre10N_comments where pre10N is pre100+N. The prefix can be anything, but is sorted alphabetically before being used to add the data to the guest book.
gbook_multi.pl source code
You may need to refresh this page to see the latest updates.