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

Forum statistics

Threads
474,431
Messages
2,571,679
Members
48,796
Latest member
Greg L.

Latest Threads

Top