March 10, 2012

How do you stop people from editing a disabled inputbox?

Question by 001

When a input textbox is disabled, you can not enter any values into the Inputbox.

However if you use google chrome and right click on the inputbox then click on inspect, you can change the values.

How do you stop people from editing a disabled inputbox?

Answer by Starx

There is no way you can stop people from changing its state and sending the data. There are two way you can do this

  1. Do not display the disabled input at all. Just like what Zend_Form does.
  2. Check the field when the form was submitted and remove it.

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!