...

View Full Version : form text input default value?



htcilt
01-16-2008, 12:44 PM
Hi,
I have a form with a keywords textbox. This then is submitted to a search results page based on what is typed in the textbox. "keywords=" is carried in the URL.
Is there a way to have a default value of a textbox (in the same way as doing option value="defaultvaluehere" selected="selected" in a drop down menu) so that if the user doesn't type anything in the box, the specified value gets carried in the URL, but is not visible in the textbox?
Hope this makes sense?

VIPStephan
01-16-2008, 12:49 PM
Default value is done with <input type="text" value="hello" />. However, a hidden default value is probably best passed with a hidden input field: <input type="hidden" value="hello" />

htcilt
01-16-2008, 01:02 PM
many thanks!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum