Forum Moderators: open

Message Too Old, No Replies

Simple Form Value

         

dwighty

2:02 pm on Aug 18, 2006 (gmt 0)

10+ Year Member



Hi There,

Does anyone know if its possible to have a default value in your Form Input area. So for example,

I want a £ sign to be present in the input field so I would use ...
<input type="text" name="Your_Budget" value="£" style="width: 80%" />

However, the client can then override the £ sign, I dont want them to. I want the writing to automatically start after this symbol.

Is this possible?

Thanks

Fotiman

2:34 pm on Aug 18, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



No. However, you might be able to create a background image of the £ and use it for the background of the text field, then give the field some left padding to leave room for the background to show through.

Alternatively, you might be able to do some very complex JavaScript to catch every key event and then make sure that the symbol was always in there, but it would not be reliable and probably alot more work than it's worth.

dwighty

10:25 am on Aug 19, 2006 (gmt 0)

10+ Year Member



Fotimanm,

Thanks for your reply. Thought that was the case.

Will leave it be for the moment.

Cheers