I need to format this field into xxx.xxx.xxx-xx It's automatically
generated by the form.php page this is the code...
function
createInputFiel dCPF($field_tit le,$input_type, $input_name,$in put_value,$inpu t_size,$td_wid th)
{
//pre: all parameters are strings.
//post: creates in inputField based on parameters.
echo"
<tr bgcolor=$this->row_color>
<td width='$td_widt h'><font
color='$this->text_color'>$f ield_title</font></td>
<td><input type='$input_ty pe'
onKeyPress=\"re turn(currencyFo rmat(this,'.','-',event))\"
maxlength='13' name='$input_na me' value='$input_v alue'
size='$input_si ze'></td>
</tr>\n";
}
And this is the page that gets the fields...
$f1->createInputFie ldCPF("<b>$lang->accountNumber: </b>
",'text','accou nt_number',"$ac count_number_va lue",'24','150' );
see the createinputFiel dCPF, it asks the form.php for the field and
shows it....it works fine, but i need to make work in the format
xxx.xxx.xxx-xx
generated by the form.php page this is the code...
function
createInputFiel dCPF($field_tit le,$input_type, $input_name,$in put_value,$inpu t_size,$td_wid th)
{
//pre: all parameters are strings.
//post: creates in inputField based on parameters.
echo"
<tr bgcolor=$this->row_color>
<td width='$td_widt h'><font
color='$this->text_color'>$f ield_title</font></td>
<td><input type='$input_ty pe'
onKeyPress=\"re turn(currencyFo rmat(this,'.','-',event))\"
maxlength='13' name='$input_na me' value='$input_v alue'
size='$input_si ze'></td>
</tr>\n";
}
And this is the page that gets the fields...
$f1->createInputFie ldCPF("<b>$lang->accountNumber: </b>
",'text','accou nt_number',"$ac count_number_va lue",'24','150' );
see the createinputFiel dCPF, it asks the form.php for the field and
shows it....it works fine, but i need to make work in the format
xxx.xxx.xxx-xx