Search needs tweaking

3 posts by 2 authors in: Forums > CMS Builder
Last Post: February 1, 2013   (RSS)

Hi,

You should just need to add an empty value to the Select A City option:

<select name="City" class="dropdown" id="type" size="1" style="font-family: Verdana; color: #800000; "> 
<option value="" selected="selected" >Select A City</option>
<?php
$schema = loadSchema('rentals'); 
$fieldSchema = $schema['City']; 
$fieldOptions = getListOptionsFromSchema($fieldSchema);

foreach ($fieldOptions as $valueAndLabel) { 
list($value,$label) = $valueAndLabel;
$encodedValue = htmlspecialchars($value); 
$encodedLabel = htmlspecialchars($label); 
print "<option value=\"$encodedValue\">$encodedLabel</option>\n"; 

?>
</select>

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com

Thanks Greg Perfect yeahhhhhhh!

Patricia

www.thenetgirl.com