This forum is no longer open and is for reading/searching only.
Please use our new MachForm Community Forum instead.
MachForm Community Forums » MachForm 2
One One Box for Price Field
Started 16 years ago by dguppy | 2 posts |
-
I wanted to have a price field that only had one entry box and would still accept a decimal entry, like the default entry for the Yen currency.
I found another forum article which described how to remove the second decimal box, but that didn't do what I wanted and I did like the look when I used the number field instead.I have listed below the changes I made which seems to work and may be of interest to others. Beware this prevents the future use of the Yen Currency.
In the file includes\view-functions.php look around line 879 for the following code:
}else{ //for yen, only display one textfield
$main_cur = $lang['price_yen'];
$cur_symbol = '¥';
and change it to
}else{ //for yen, only display one textfield
$main_cur = $lang['price_pound_main'];
$cur_symbol = '£';Finally to change the currency in the email look around line 325 of entry includes\entry-functions.php and change
case 'yen' : $currency = '¥';break;
to
case 'yen' : $currency = '£';break;Note: the above changes the Yen to £ Pound, but a similar change could be made for the US$.
If somebody has a better method please reply
Posted 16 years ago # -
Actually, your method is pretty good already :-)
MachForm Founder
Posted 16 years ago #
Reply
You must log in to post.