Forums
This topic is locked
Pre-filled fields
Posted 19 May 2005 18:26:09
1
has voted
19 May 2005 18:26:09 Jeff Baranda posted:
Hello,I have created a form for my site that has some fields already filled out, like the users name and department ID. How can I make it so they cannot change these values?
Thanks in advance. <img src=../images/dmxzone/forum/icon_smile_blush.gif border=0 align=middle>
Replies
Replied 20 May 2005 01:22:51
20 May 2005 01:22:51 Sean McGill replied:
adding disabled to the imput line should remove any change of user editing.
Replied 20 May 2005 02:00:59
20 May 2005 02:00:59 Jeff Baranda replied:
I'll give it a shot.
THANKS!
THANKS!
Replied 20 May 2005 02:39:12
20 May 2005 02:39:12 Jeff Baranda replied:
It does disable the field but it does not write the data to my database after I hit submit.
In other words, if I pre-fill a name field and disable it, once the submit button is clicked it writes everything to the database except the pre-filled name.
Am I missing something?
In other words, if I pre-fill a name field and disable it, once the submit button is clicked it writes everything to the database except the pre-filled name.
Am I missing something?
Replied 20 May 2005 12:13:23
20 May 2005 12:13:23 Wayne Hultum replied:
The info you want to be already filled in doesn’t need to go in a form field, you can just write it to the page, then you can put the info you want submitting to the database in hidden fields.
Hope it makes sense
Wayne
Hope it makes sense
Wayne
Replied 26 May 2005 01:18:24
26 May 2005 01:18:24 Jeff Baranda replied:
Yes, that makes sense.
I shall try it ASAP.
Thanks!
I shall try it ASAP.
Thanks!
Replied 26 May 2005 01:25:56
26 May 2005 01:25:56 Matt Millican replied:
You can also use the readonly attribute. Works well, and still allows the info in the field to be submitted.
Matt Millican
InternetMill.com
www.internetmill.com
(XP Pro / Dreamweaver MX / Access XP Pro/ MS SQL / ASP / VB Script / PHP, mySQL / Photoshop / Fireworks)
Matt Millican
InternetMill.com
www.internetmill.com
(XP Pro / Dreamweaver MX / Access XP Pro/ MS SQL / ASP / VB Script / PHP, mySQL / Photoshop / Fireworks)
Replied 26 May 2005 01:37:32
26 May 2005 01:37:32 Dave Thomas replied:
u could also just response write these to the page, seeing as you don't want them changing
they don't even need to be included in the form
regards
Dave Thomas
<b>DMX Zone Manager</b>
they don't even need to be included in the form
regards
Dave Thomas
<b>DMX Zone Manager</b>
Replied 26 May 2005 22:12:13
26 May 2005 22:12:13 Jeff Baranda replied:
Tried using hidden field but I couldn't get it to populate the sql table... I'm sure I am doing something wrong. What about the read only attribute, how is that done?
Thanx in advance,
Jmb
Thanx in advance,
Jmb
Replied 27 May 2005 12:32:25
27 May 2005 12:32:25 arvind G replied:
<input name="symbol" type="text" readonly="yes" value="" size="32">
use readonly="yes" inyour text field.
use readonly="yes" inyour text field.
Replied 27 May 2005 18:39:56
27 May 2005 18:39:56 Chris Charlton replied:
<BLOCKQUOTE id=quote><font size=1 face="Verdana, Arial, Helvetica" id=quote>quote:<hr height=1 noshade id=quote>You can also use the readonly attribute. Works well, and still allows the info in the field to be submitted.<hr height=1 noshade id=quote></BLOCKQUOTE id=quote></font id=quote><font face="Verdana, Arial, Helvetica" size=2 id=quote>
My vote is the readonly, IF you must have the ID/field shown on the form, otherwise use a hidden field.
~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>
My vote is the readonly, IF you must have the ID/field shown on the form, otherwise use a hidden field.
~ ~ ~ ~ ~ ~ ~
Chris Charlton <i>- DMXzone Manager</i>
<font size=1>[ Studio MX/MX2004 | PHP/ASP | SQL | XHTML/CSS | XML | Actionscript | Web Accessibility | MX Extensibility ]</font id=size1>
Replied 28 May 2005 02:33:33
28 May 2005 02:33:33 Jeff Baranda replied:
Readonly worked great!
Thanks once again to all that responded.
Y'all are tops in my book! <img src=../images/dmxzone/forum/icon_smile_shock.gif border=0 align=middle>
Thanks once again to all that responded.
Y'all are tops in my book! <img src=../images/dmxzone/forum/icon_smile_shock.gif border=0 align=middle>