[FX.php List] Edit multiple records/portal / how to pass the data?

Denis Somar dsomar at gmail.com
Sun Jan 15 09:50:26 MST 2012


That fixed it!  Thanks for the clarification Leo!

Does anyone have any example snippets of editing child records through a
single parent record/FX call?

Thanks,
Denis

On Sun, Jan 15, 2012 at 11:40 AM, Leo R. Lundgren <leo at finalresort.org>wrote:

> You need to make the fields arrays by naming them -recid[x] and size[x].
> Normally you use a loop to produce the x being 1,2,3 etc. Then in the
> server side you will see an array in the $_POST data, and can loop that to
> process the input.
>
> 15 jan 2012 kl. 17.38 skrev Denis Somar:
>
> Dear FXers,
>
> I've read up on the two primary methods of editing multiple records: one
> big edit via portals vs. calling FMedit in a loop for each record.
>
> I understand portals is faster.
>
> What I'm trying to understand and ascertain is if my edit form with each
> record row is passing unique info via Submit/POST that the results page can
> manage the edit process.  My edit page's generated HTML, simplified, looks
> like this:
>
> <form method="post" action"results.php">
> <tr><td>
>     <input name="-recid" value="1">
>     <input name="size" value="xx">
> </tr></td>
> <tr><td>
>     <input name="-recid" value="4">
>     <input name="size" value="yy">
> </tr></td>
> <tr><td>
>     <input name="-recid" value="5">
>     <input name="size" value="zz">
> </tr></td>
> <input type="submit" value="Save Changes" name="submit">
> </form>
>
> I think the above is correct, but when I print_r($_POST) on the results
> page, I see this:
>
> Array
> (
>     [submit] => Save Changes
>     [-recid] => 4
>     [size] => zz
>     [FoundCount] => 2
> )
> 1
>
> Thus I'm not sure if editing on my results page will work. Any
> help/thoughts are appreciated!
>
> Best,
> Denis
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
>
>
> -|
>
>
> _______________________________________________
> FX.php_List mailing list
> FX.php_List at mail.iviking.org
> http://www.iviking.org/mailman/listinfo/fx.php_list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iviking.org/pipermail/fx.php_list/attachments/20120115/c8f7a6d2/attachment.html


More information about the FX.php_List mailing list