![]() |
![]() |
![]() |
||||
Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact us. |
![]() ![]() |
|
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed. |
|
Thread Tools |
![]() |
#1 |
Videochat Solutions
Industry Role:
Join Date: Aug 2004
Location: Canada
Posts: 48,529
|
HTML / Programming question for the propellerheads out there..
Tits!
I have a web page with a bunch of fields on it. The data in the fields are populated from a DB. The user can edit all of the fields except for one. That field looks like this: <input id="pC" name="pC" type="text"placeholder="Blah" class="form-control valid" maxlength="10" value="" disabled="disabled"> The problem is that this LOOKS like an editable field so users try to change the value. What I want to do is just display the data it contains in a plain-ol' format. Any suggestions?
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#2 |
Confirmed User
Industry Role:
Join Date: Oct 2013
Location: Canada
Posts: 866
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#3 |
Just Doing My Own Thing
Industry Role:
Join Date: Jan 2011
Location: London, Spain, New Zealand, GFY - Not Croydon...
Posts: 25,034
|
Code:
<input id="pC" name="pC" type="text" STYLE="background-color: #A9A9A93" placeholder="Blah" class="form-control valid" maxlength="10" value="" disabled="disabled"> That would be the standard way of indicating a text field is not editable - You can see 'blablah'..... https://jsfiddle.net/bwh0cnme/ I always forget about jsfiddle...
__________________
- Chaturbate Script - https://gfy.com/fucking-around-and-b...er-issues.html - Now supports White Labels |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#4 |
Confirmed User
Industry Role:
Join Date: Aug 2001
Location: Scotland
Posts: 2,238
|
Change the css on the disabled selector. For example:
.form-control:disabled, .form-control[readonly] You'll likely have a background colour attached to it - remove it. Add in: border: none;
__________________
Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the Universe trying to produce bigger and better idiots. So far, the Universe is winning. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#5 |
Confirmed User
Industry Role:
Join Date: Apr 2010
Posts: 1,084
|
Hi,
disabled fields should be greyed out automatically by most modern browsers, however you can simply add a css rule for the disabled input fields like input:disabled { background:#f0f0f0; } cheers, z |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#6 |
Drinker of Scotch
Industry Role:
Join Date: May 2003
Location: Texas
Posts: 242
|
If all you want is to display the data, get rid of the input field since the data does not change. Instead, style a text element (P, span, div, etc.) and place it in the proper position on your form.
__________________
Ethernet Servers Quote: CS: Linux can pretty much run on a potato. Which is a GOOD thing. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#7 |
Videochat Solutions
Industry Role:
Join Date: Aug 2004
Location: Canada
Posts: 48,529
|
Thank you! will try all ideas today.
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#9 | |
Confirmed User
Industry Role:
Join Date: Apr 2010
Posts: 1,084
|
Quote:
![]() |
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#11 |
Confirmed User
Industry Role:
Join Date: Apr 2010
Posts: 1,084
|
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#13 |
Confirmed User
Industry Role:
Join Date: Apr 2007
Location: planet earth
Posts: 50
|
Bootstrap and javascript are not a solution. I can post a lot query using curl in command line.
Fix your pĥp script, this is the right way. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#14 |
Making PHP work
Industry Role:
Join Date: Nov 2002
Location: 🌎🌅🌈🌇
Posts: 20,227
|
<input id="pC" name="pC" type="hidden" value="Blah" >Blah
![]()
__________________
Make Money with Porn |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#15 |
Videochat Solutions
Industry Role:
Join Date: Aug 2004
Location: Canada
Posts: 48,529
|
Thanks for the suggestions, but none of them did what I was looking for.
Here's a better description of the problem. I have form that people can access and modify as they need to. One of the form elements is a commission field, that they cannot edit. It looks like this ![]() The code that displays it looks like this <input id="Commission" name="Commission" type="text" placeholder="Commission" class="form-control valid" maxlength="10" value="" disabled="disabled"> Input for this field is already disabled and that's fine, it works, but it still LOOKS like a field that can be edited. All I really want it to say is "Commission: 50%" How do I simply show the value of "Commission" without making it an input field?
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#16 |
Videochat Solutions
Industry Role:
Join Date: Aug 2004
Location: Canada
Posts: 48,529
|
Nothin' ? Nada, zip ?
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#17 |
Drinker of Scotch
Industry Role:
Join Date: May 2003
Location: Texas
Posts: 242
|
See my previous comment.
__________________
Ethernet Servers Quote: CS: Linux can pretty much run on a potato. Which is a GOOD thing. |
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#18 |
Confirmed User
Industry Role:
Join Date: Apr 2010
Posts: 1,084
|
Contacted you on skype.
|
![]() |
![]() ![]() ![]() ![]() ![]() |
![]() |
#19 |
Industry Role:
Join Date: Mar 2003
Location: San Diego
Posts: 32,173
|
Great ideas already above!!
![]()
__________________
|
![]() |
![]() ![]() ![]() ![]() ![]() |