pakenney38 Posted June 20, 2006 Share Posted June 20, 2006 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? Quote Link to comment https://forums.phpfreaks.com/topic/12489-prevent-user-from-typing-new-info-into-form/ Share on other sites More sharing options...
realjumper Posted June 20, 2006 Share Posted June 20, 2006 [code]<input type="text" name="whatever" value="<?php $whatever ?>" readonly>[/code]Pretty sure that this works cross browser Quote Link to comment https://forums.phpfreaks.com/topic/12489-prevent-user-from-typing-new-info-into-form/#findComment-47790 Share on other sites More sharing options...
pakenney38 Posted June 20, 2006 Author Share Posted June 20, 2006 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. Quote Link to comment https://forums.phpfreaks.com/topic/12489-prevent-user-from-typing-new-info-into-form/#findComment-47792 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.