PDA

View Full Version : drop down box


info273228
04-11-2009, 10:24 PM
Hi,

How do you use the Contact Form Solution on drop-down boxes?
The options given really only work on TEXT fields...

<input name="Contact_Name" type="text" id="Contact_Name" class="formInput" value="<?php echo(ValidatedField("contact","Contact_Name")) ?>" />
<input name="addblock1" type="text" id="addblock1" style="display:none" value="" />
<br />
<?php
if (ValidatedField("contact","contact")) {
if ((strpos((",".ValidatedField("contact","contact").","), "," . "1" . ",") !== false || "1" == "")) {
if (!(false)) {
?>
<p class="emailFormError style1">* Please provide your Full Name.</p>
<?php //WAFV_Conditional contact.php contact(1:)
}
}
}?>

Ray Borduin
04-13-2009, 07:50 AM
Select fields should behave the exact same way as text fields. What have you tried? Where are you running into trouble?

info273228
04-16-2009, 01:45 PM
Hi, Ray

The problem is the VALUE field
value="<?php echo(ValidatedField("contact","Contact_Name")) ?>" />

in a dropdown box, it is not what the user types in but a set value for each option..

Regards, Ken

Ray Borduin
04-16-2009, 02:08 PM
Are you using Dreamweaver? use the dreamweaver properties panel to set the values in the list. Set the selected value in that interface to: <?php echo(ValidatedField("contact","Contact_Name")) ?>