TOPIC:

Auto fill multiple select field: values not correctly in mail 1 month 1 week ago #253016

  • Topic Author
  • michiel@TSS
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 129
  • Thanks: 0

tihana.krivic wrote: Hi,

ah I saw now.
Give me some time for this, that I can investigate it on your page :)

Regards,
Tihana


Hello Tihana... any new on this?
Regards,
Michiel

Please Log in or Create an account to join the conversation.

Auto fill multiple select field: values not correctly in mail 1 month 1 week ago #253024

  • Topic Author
  • michiel@TSS
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 129
  • Thanks: 0

tihana.krivic wrote: Hi,

like this, I tested it (I added it in Manage Script)and it works:

function ff_decimalen(element,action)
{
var result=Number(element.value);
var result1=result.toFixed(2);
var result2=result1.replace(/\,/g, '').replace(/\./g, ',');
element.value=result2;
}

Regards,
Tihana


Hello Tihana,
No I have this code in my Manage Script "decimalen" and the "." is replaced by the ",":
function ff_decimalen(element,action)
{
var result=Number(element.value);
var result1=result.toFixed(2);
var result2=result1.replace(/\,/g, '').replace(/\./g, ',')
element.value=result2;
} // ff_decimalen

But if you now fill in a number with a comma (5,85) I get NaN. What am I missing?!
A point need to be changed to a comma, but is it is a comma already, it should be ok ;)

Regards,
Michiel

Please Log in or Create an account to join the conversation.

Auto fill multiple select field: values not correctly in mail 1 month 1 week ago #253028

  • tihana.krivic's Avatar
  • tihana.krivic
  • Offline
  • Moderator
  • Moderator
  • Posts: 3815
  • Karma: 3
  • Thanks: 304
Hi,

ah understand, then use this code:
function ff_decimalen(element,action)
{
var result=Number(element.value);
var result1=result.toFixed(2);
if(isNaN(result1)) {
return '';
}
var result2=result1.replace(/\,/g, '').replace(/\./g, ',');
element.value=result2;

}

Regards,
Tihana

Please Log in or Create an account to join the conversation.

Auto fill multiple select field: values not correctly in mail 1 month 1 week ago #253058

  • Topic Author
  • michiel@TSS
  • Offline
  • Senior Breezer
  • Senior Breezer
  • Posts: 129
  • Thanks: 0
Works great! Thanks ;)

Please Log in or Create an account to join the conversation.

Moderators: ForumSupport
Time to create page: 0.048 seconds

BreezingForms Pro 1.4.7 for WordPress Released!

Available in the membership section.

September Discount!

Massive discounts on all subscriptions!

Get Your Subscription Here

Quick Links

Downloads

BreezingForms

ContentBuilder

BreezingCommerce

Templates

Documentation

BreezingForms

ContentBuilder

BreezingCommerce

Apprendre BreezingForms (French Community)

Apprendre et maîtriser BreezingForms par des tutoriels et exemples, le tout en français

breezingforms.eddy-vh.com

Questions et réponses sur les forums de l'AFUJ

AFUJ

Special Offer

Summer Sale! All subscriptions at a special price!

Includes prio support, all of our current and future Joomla!® extensions and Joomla!® templates for the duration of your membership.

Get it from here

3rd Party Discount - 25% Off

We help you to keep your costs under control. If you are a new member and purchased a form building tool from a different form vendor, then you'll get a 25% discount on our subscription plans.

How to receive the discount:

Send us a quick email to sales@crosstec.org with a proof of purchase (for example a paypal receipt), await payment instructions and enjoy your membership!