Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Visible input field, not accessible
Old 02-02-2012, 02:24 PM Visible input field, not accessible
feraira's Avatar
BeTheBand!

Posts: 358
Trades: 0
Hi,

How do I go around making an input visible on a page but the user has no access to click it and change the data?

For example,
If I have an empty input on the page, the user inputs the data. Once they have input their data and saved the results to a database, if they view the same page again, they cannot edit their entry.

Thanks
feraira is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-02-2012, 03:49 PM Re: Visible input field, not accessible
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
Hey,

you can set the input field to read only by adding the readonly attribute.

PHP Code:
<input type="text" name="inputfield" value="defaultvalue" readonly="readonly" /> 
http://www.w3schools.com/tags/att_input_readonly.asp
miki86 is offline
Reply With Quote
View Public Profile
 
Old 02-04-2012, 03:15 PM Re: Visible input field, not accessible
kline11's Avatar
SearchBliss Web Tools

Posts: 1,787
Name: John
Location: USA
Trades: 0
OR
<input type="text" name="inputfield" value="defaultvalue" disabled />
__________________

Please login or register to view this content. Registration is FREE
kline11 is offline
Reply With Quote
View Public Profile
 
Old 02-04-2012, 05:14 PM Re: Visible input field, not accessible
Physicsguy's Avatar
404 - Title not found

Posts: 1,060
Name: Scott Kaye
Location: Ontario
Trades: 0
Or even:

HTML Code:
<input type="text" name="input" value="You Can't Change Me!" readonly disabled />
__________________

Please login or register to view this content. Registration is FREE
Physicsguy is offline
Reply With Quote
View Public Profile Visit Physicsguy's homepage!
 
Old 02-05-2012, 03:08 PM Re: Visible input field, not accessible
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
For XHTML doctypes the attributes require a quoted value eg:

HTML Code:
readonly="readonly"
and/or
HTML Code:
disabled="disabled"
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-01-2012, 10:43 AM Re: Visible input field, not accessible
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
Put a readonly="readonly" attribute
miki86 is offline
Reply With Quote
View Public Profile
 
Old 04-01-2012, 10:48 AM Re: Visible input field, not accessible
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by miki86 View Post
Put a readonly="readonly" attribute
Yes it's been covered


You are responding to an IdiBot that copy and pasted
Quote:
Originally Posted by zqhayetong View Post
How do I go around making an input visible on a page but the user has no access to click it and change the data?
from the first post
Quote:
Originally Posted by feraira View Post
How do I go around making an input visible on a page but the user has no access to click it and change the data?
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-01-2012, 02:07 PM Re: Visible input field, not accessible
miki86's Avatar
Extreme Talker

Posts: 239
Location: print_r($serbia);
Trades: 0
I didn't noticed, i thought the guys solved bot problems...guess not.
miki86 is offline
Reply With Quote
View Public Profile
 
Old 04-01-2012, 02:59 PM Re: Visible input field, not accessible
chrishirst's Avatar
Defies a Status

Posts: 43,963
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by miki86 View Post
i thought the guys solved bot problems
At one time yes,
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is online now
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Reply     « Reply to Visible input field, not accessible
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.32341 seconds with 11 queries