Jump to content

Archived

This topic is now archived and is closed to further replies.

pakenney38

Prevent user from typing new info into form.

Recommended Posts

I have an HTML form that submits to a PHP page which I want to display the form (filled out) as a receipt of the submission. This PHP page uses the Form variables from the HTML page to set the default values of the fields in the PHP page. When displayed as a receipt in the PHP page, I want to make it so that the user of the form cannot type in anything other than the default value, BUT also make it so that the fields are not greyed out.
Any clue?

Share this post


Link to post
Share on other sites
[code]
<input type="text" name="whatever" value="<?php $whatever ?>" readonly>
[/code]

Pretty sure that this works cross browser

Share this post


Link to post
Share on other sites
Sorry to waste your time with that. I didn't think 'readonly' would have the correct effect, so I didn't try it, but it does exactly what I need it to do, so thanks.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.