[FX.php List] add multiple records with one submit

Bob Patin bob at patin.com
Mon Sep 22 17:40:50 MDT 2008


Hi Kathleen,

What I would do this:

When you're displaying your records in a FOREACH loop, put a checkbox  
at the front of each table row; use a counter to make the checkbox  
names unique; append your counter to the checkbox's name, like this:

NAME="box_name<?php echo $counter; ?>"

and then increment the counter at the bottom of your foreach loop...

Enclose the whole FOREACH loop in a form, and retrieve your checkboxes  
and perhaps a hidden field in each table row that contains the record  
id of each record.

Then, in your processing page, you'd need to grab all the record IDs   
and checkbox values, and for each record where the checkbox's value is  
set to checked, you'd write that particular record to your related  
table.

This is probably way too convoluted an explanation, but that's how  
you'd do it... :)

Bob Patin
Longterm Solutions
bob at longtermsolutions.com
615-333-6858
http://www.longtermsolutions.com
iChat: bobpatin
AIM: longterm1954
FileMaker 9 Certified Developer
Member of FileMaker Business Alliance and FileMaker TechNet
--------------------------
FileMaker hosting and consulting for all versions of FileMaker
PHP • Full email services • Free DNS hosting • Colocation • Consulting

On Sep 22, 2008, at 6:25 PM, Kathy Mohr wrote:

> I've been meaning to ask this question for quite some time but just  
> hadn't
> taken the time to do so.  I have an xserve running Filemaker server  
> 8.5
> and using FX.php.  One of the webpages displays a list of found  
> records.
> I currently have a Select link that the user can click to add each
> individual record to a related table.  What I would like to do is be  
> able
> to have a checkbox associated with each record so that the user can  
> check,
> check, check all the records they want added to the related table  
> and then
> click the submit button.  I've searched and searched for a solution  
> to my
> problem. Can anyone help?
>
> Thank you.
>
> Kathleen Mohr
> Educational Technologist/Professional Development
> North Central Ohio Educational Service Center
> Tiffin Center
> 65 St. Francis Avenue
> Tiffin, Ohio  44883
> 419-447-2929
> kmohr at ncoesc.org
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list



More information about the FX.php_List mailing list