Text area in form with suggestive text

I am building a health and safety touch screen for a building company, and one of the text area fields he wants as suggestive text.

Basically as he put it, they all got big hands and very dirty and to make it easy on them he wants for the company they are working for too appear when they start typing the first couple of characters, but if the company they work for isn’t put as a suggestion they can carry on typing the company they are working for, until as he puts it he makes it a suggestion option, if that can be done.

Is this dooable?


 <tr>
 <td>Company</td>
 <td>:</td>
 <td><input name="companies" type="text" id="companies" size="35" class="textboxid"></td>
 </tr>

Hi,

Have a look at this: http://jqueryui.com/autocomplete/
Should do what you want.

Perfect, thank you Pullo.

Can I ask you another question please, the function is working but i think I need a few tweeks.

There are a few fields that need to be completed before they move on, so rather than leave the page I wanted to check it on the page, and if completed they can move on.

Im using the script below:


<script> 
function formcheck() {  var fields = $(".ss-item-required")        .find("select, textarea, input").serializeArray();    $.each(fields, function(i, field) {    if (!field.value)      alert(field.name + ' is required');   });   console.log(fields);}</script>

on this part of the formL


 <tr>
 <td width="26%">Name <span style="color:#FF0000">*</span></td>
 <td width="2%">:</td>
 <td width="72%"><div class="ss-item-required"><input name="names" type="text" id="names" size="35" class="textboxid"></div></td>
 </tr>

<input type="image" src="images/blue_arrow.png" name="Submit" value="Submit" title="Submit">
 <a href="#" onclick="formcheck(); return false">Submit</a>

There a couple of things, basically if they dont put anything in name they get an alert, but if they do and I click the submit button, it doesnt proceed to page3.php.

The second thing is I would prefer to use:

<input type=“image” src=“images/blue_arrow.png” name=“Submit” value=“Submit” title=“Submit”>

rather than:

<a href=“#” onclick=“formcheck(); return false”>Submit</a>

This is the link to page 2:

http://www.whhazardreport.co.uk/page2.php?top=CSP&middle=Level 5&bottom=Stair Core

Its OK I got it sorted now, thank you

Great. Thanks for letting us know.