close ad
 
Important WebAssist Announcement
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

pre populating drop down

Thread began 8/19/2014 5:57 am by Jamie | Last modified 8/19/2014 12:58 pm by Jamie | 2275 views | 8 replies

Jamie

Many thanks Craig

I have tried that but there was already <?php (isset($_GET["invalid"])?ValidatedField("contact","Section"):"") ?> within the select value equal to. I have tried replacing it with $_GET['option'] entirely and also just replacing invalid with option... neither work

these are the options I am working with

<option id="" value="No selection made" selected>Please Select</option>
<option value="Commercial" <?php if (!(strcmp("Commercial", (isset($_GET["invalid"])?ValidatedField("contact","Section"):"")))) {echo "selected=\"selected\"";} ?>>Commercial</option>
<option value="Domestic" <?php if (!(strcmp("Domestic", (isset($_GET["invalid"])?ValidatedField("contact","Section"):"")))) {echo "selected=\"selected\"";} ?>>Domestic</option>
<option value="PestControl" <?php if (!(strcmp("PestControl", (isset($_GET["invalid"])?ValidatedField("contact","Section"):"")))) {echo "selected=\"selected\"";} ?>>Pest Control</option>
<option value="CleaningProducts" <?php if (!(strcmp("CleaningProducts", (isset($_GET["invalid"])?ValidatedField("contact","Section"):"")))) {echo "selected=\"selected\"";} ?>>Cleaning Products</option>



I have also removed the validation from each one and using :

<option id="" value="No selection made" selected <?php if (!(strcmp("No selection made", "$_GET[\'option\']"))) {echo "selected=\"selected\"";} ?>>Please Select</option>
<option value="Commercial" <?php if (!(strcmp("Commercial", "$_GET[\'option\']"))) {echo "selected=\"selected\"";} ?>>Commercial</option>
<option value="Domestic" <?php if (!(strcmp("Domestic", "$_GET[\'option\']"))) {echo "selected=\"selected\"";} ?>>Domestic</option>
<option value="PestControl" <?php if (!(strcmp("PestControl", "$_GET[\'option\']"))) {echo "selected=\"selected\"";} ?>>Pest Control</option>
<option value="CleaningProducts" <?php if (!(strcmp("CleaningProducts", "$_GET[\'option\']"))) {echo "selected=\"selected\"";} ?>>Cleaning Products</option>



but that just generates the following error: Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) in /home/gahel6wj/public_html/contact2.php on line 313

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...