Jump to content


Photo

Prevent user from typing new info into form.


  • Please log in to reply
2 replies to this topic

#1 pakenney38

pakenney38
  • Members
  • PipPipPip
  • Advanced Member
  • 90 posts

Posted 20 June 2006 - 08:46 PM

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?

#2 realjumper

realjumper
  • Members
  • PipPipPip
  • Advanced Member
  • 399 posts

Posted 20 June 2006 - 08:54 PM

<input type="text" name="whatever" value="<?php $whatever ?>" readonly>

Pretty sure that this works cross browser

#3 pakenney38

pakenney38
  • Members
  • PipPipPip
  • Advanced Member
  • 90 posts

Posted 20 June 2006 - 09:23 PM

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.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users