html form population

R

Robert M. Gary

Sorry if this isn't the right group but I didn't find a group dedicated
to html. I'm creating a web page that includes a form with text fields.
Is there a way I can pre-populate the text fields using the parameters
received in the post request (i.e. the www.foo.com?myvalue=hello). So I
can populate the "myvalue" text field with "hello" when the page loads.
Just naming the text field "myvalue" doesn't seem to do it.

Thanks, and sorry again for not being completly on topic

-Robert
 
H

Hal Rosser

Robert M. Gary said:
Sorry if this isn't the right group but I didn't find a group dedicated
to html. I'm creating a web page that includes a form with text fields.
Is there a way I can pre-populate the text fields using the parameters
received in the post request (i.e. the www.foo.com?myvalue=hello). So I
can populate the "myvalue" text field with "hello" when the page loads.
Just naming the text field "myvalue" doesn't seem to do it.

Thanks, and sorry again for not being completly on topic

-Robert
The 'value' attribute is what you need to fill in the text box with the
initial value.
<input type="text" name="fullname" id="fullname" value="Hello World" />
(the words "Hello World" would appear in the above text box.)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,011
Latest member
AjaUqq1950

Latest Threads

Top