Jump to content

Recommended Posts

Im having problems with a field in a form i am using, i need the salary field in the form to hold a "£" in the input field by default, can anyone help?

 

My code for the salary field is:

 

<fieldset> 
<label for="salary">Salary:</label> 
<input name="salary" type="text" id="salary" value="<?php echo $_POST['salary']; ?>"/> 
<span class="redboldtxt"><?php echo "$salary_message";?></span></fieldset>

Link to comment
https://forums.phpfreaks.com/topic/92304-form-input-help-salary-field/
Share on other sites

From my experience adding that tot he actual field is not worth the time, effort or greater propensity of error. Just put the symbol right in front of the field

 

Example:

 

           __________
Salary  £ [__________]

thats what I normally do.

I agree. try summing up those number when there is something other than the number in the field. Can be a major nightmare. If you are going to have several different dollar amounts add another field with the currency type. then the scripts could generate the currency symbol on the fly.

 

Ray

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.