How do i "lock" a form field?

This is a discussion on "How do i "lock" a form field?" within the Web Page Design section. This forum, and the thread "How do i "lock" a form field? are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Mar 8th, 2007, 10:47
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
How do i "lock" a form field?

I have a field in an html form, which im filling via php.

Problem is that the user is able to edit this field and enter anything they want.

Is it possible to make form fields locked, so that the contents cannot be changed?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Mar 8th, 2007, 10:54
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do i "lock" a form field?

decided just to make the field hidden and echo a variable out in the right place to "give the impression".
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Mar 8th, 2007, 12:38
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do i "lock" a form field?

by using the readonly attribute.

Code: Select all
<input type="text" readonly="readonly" .... />
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Mar 9th, 2007, 08:20
Reputable Member
Join Date: May 2006
Location: Northampton, UK
Posts: 399
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do i "lock" a form field?

ooo ... thankyou v much

This is my problem you see...... everythign i know is learnt on an as i need it basis, so i tend to miss things that most people would learn on day 1 of html class, simply because i had no need for it untill now.

Thanks kari
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Mar 9th, 2007, 11:37
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do i "lock" a form field?

no problem
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Mar 14th, 2007, 08:24
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do i "lock" a form field?

I always used <input type="text" name="blah" DISABLED />

Is there a difference?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Mar 14th, 2007, 11:02
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do i "lock" a form field?

Disabled:
Quote:
When set, the disabled attribute has the following effects on an element:
Readonly
Quote:
When set, the readonly attribute has the following effects on an element:
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Mar 15th, 2007, 01:01
Ryan Fait's Avatar
Elite Veteran
Join Date: May 2006
Location: Las Vegas
Posts: 3,787
Thanks: 0
Thanked 0 Times in 0 Posts
Re: How do i "lock" a form field?

Ah, okay. I guess I've seen read-only text boxes before, just never had to use one. They both can come in quite handy for things, I'm sure.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
lock form

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a "tag" system to find relevant "related" pages MrQuestions PHP Forum 3 Mar 20th, 2008 23:06
[SOLVED] Show "Image" Depends On User "Status"? Monie Classic ASP 6 Oct 16th, 2007 01:22
? IS "meta name="robots" content="?" necessary in pages ? Love2Java Starting Out 6 Aug 8th, 2007 13:48
Question about "Browse" field for web form... pdbuddy Web Page Design 2 Apr 7th, 2007 00:20
window.opener.document["nameForm"].getElementById("someid").value; doesnt work drpompeii JavaScript Forum 0 Feb 17th, 2007 23:09


All times are GMT. The time now is 15:54.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42