[FX.php List] Dynamic Value Lists

Andy Gaunt andy at fmpug.com
Fri Oct 21 09:56:57 MDT 2005


Peter 

 

Add an option with a blank value and  the selected tag above your foreach

 

<select name="Title">

            <option value=”” selected></option>

            <?

    foreach($listResult['valueLists']['Title'] as $key=>$value) {

    ?>

            <option value="<?php echo $value; ?>"><?php echo $value;
?></option>

            <?

    }

    ?>

          </select>

 

 

Andy Gaunt

T: 407.810.4722

andy at fmpug.com

http://www.fmpug.com

                       

Recipient of FileMaker’s 2005 “Mad Dog” Public Relations Award

 

October 27th 2005, 6pm Orlando FMPug – What’s Hot for FileMaker Developers,
a presentation of FileMaker 8 Advanced features.

For other chapter locations, dates & times please visit the website at
http://www.fmpug.com

If you can make it to a meeting, please RSVP at
http://www.fmpug.com/rsvp.php

 

   _____  

From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Peter Bates
Sent: Friday, October 21, 2005 11:54 AM
To: FX.php Discussion List
Subject: [FX.php List] Dynamic Value Lists

 

Another newbie question:

 

I have a value list that is being pulled from my database. The value list in
the database is not a static list, instead it uses values from a field. The
issue I'm having is that when the form is displayed, it displays the first
item in the list. I need it to be initially blank. Filemaker will not add an
empty (blank) value to a dynamic value list. so this needs to be done in my
php code. This is what I have right now:

 

<select name="Title">

            <?

    foreach($listResult['valueLists']['Title'] as $key=>$value) {

    ?>

            <option value="<?php echo $value; ?>"><?php echo $value;
?></option>

            <?

    }

    ?>

          </select>

 

Thanks,

 

Peter Bates

Microcomputer Network Specialist

Automated Services

St. Joseph County Public Library

304 S. Main St.

South Bend, IN  46601

voice: (574) 282-4610

fax: (574) 282-4662

e-mail: HYPERLINK "mailto:p.bates at sjcpl.org"p.bates at sjcpl.org

www:  HYPERLINK "http://www.libraryforlife.org"http:/www.libraryforlife.org

library catalog:

HYPERLINK
"http://www.libraryforlife.org/onlinecatalog/onlinecatalog.html"http://www.l
ibraryforlife.org/onlinecatalog/onlinecatalog.html

 


--
No virus found in this incoming message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.4 - Release Date: 10/18/2005



-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.344 / Virus Database: 267.12.4 - Release Date: 10/18/2005
 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.iviking.org/pipermail/fx.php_list/attachments/20051021/b288be48/attachment-0001.html


More information about the FX.php_List mailing list