Jump to content

Form input help (salary field)


PRodgers4284

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.