[FX.php List] Dynamic Value Lists

Andy Gaunt andy at fmpug.com
Sun Oct 23 17:13:29 MDT 2005

Kevin –


Your rant is well voiced. I use the options in my situations as you with a
please select/specify/choose to avoid having invalid HTML code.


I was just responding to Peter’s request. Maybe a “ ” would be better
suited in the option tag to give a valid option. The value itself can of
course be empty (or even put in “The user did not make a choice” as the


The better the standards of all developers here the better our clients,
customers and business web sites will be.


Andy Gaunt

T: 407.810.4722

andy at 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

If you can make it to a meeting, please RSVP at



From: fx.php_list-bounces at mail.iviking.org
[mailto:fx.php_list-bounces at mail.iviking.org] On Behalf Of Kevin Futter
Sent: Sunday, October 23, 2005 7:05 PM
To: FX.php Discussion List
Subject: Re: [FX.php List] Dynamic Value Lists


On 22/10/05 2:32 AM, "Peter Bates" <p.bates at sjcpl.org> wrote:


Thanks Andy

On Oct 21, 2005, at 10:56 AM, Andy Gaunt wrote:

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;

Apologies for sounding like a broken record, but as a web standards advocate
I feel obliged to let you know that an empty option element will invalidate
your HTML; you’re better off, if your circumstance allows, using placeholder
text (something like “Please Select” for example). This will still work with
Andy’s solution, and is better for accessibility and usability reasons, as
well as being valid per spec.

(It constantly amazes me that people can learn to do fabulous, difficult and
technical things with tools like PHP, FM, XSLT etc, that require exacting
syntax and a considered approach, but still churn out tag soup when it comes
to the HTML.)

Sorry, off-topic rant over! 

Kevin Futter
Webmaster, St. Bernard's College

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

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

More information about the FX.php_List mailing list