NO FORMAT IN JS FORMULA

Post Reply
fahmisalim
Sponsor
Sponsor
Posts: 320
Joined: 12 May 2015, 08:33
Name: Fahmi Salim
Location: Indonesia BSD City
Company Name: AIMan
Contact:

NO FORMAT IN JS FORMULA

Post by fahmisalim »

Dear Sergey,

No format apply in JS formula, which should be followy format as I setup in field info (0/,/,) as attachment below:
Screen Shot 2018-05-22 at 16.26.51.png
And the result still plain!! see below: (see field Tertulis)
Screen Shot 2018-05-22 at 16.25.51.png

Please help, this is very important in my app

Regards,
Fahmi Salim
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: NO FORMAT IN JS FORMULA

Post by support »

Format will be apply in listing or info page when you output value.
We can't use php setting to format js number.
fahmisalim
Sponsor
Sponsor
Posts: 320
Joined: 12 May 2015, 08:33
Name: Fahmi Salim
Location: Indonesia BSD City
Company Name: AIMan
Contact:

Re: NO FORMAT IN JS FORMULA

Post by fahmisalim »

no way to solve it? because my user always have mistaken when they input number with alot of zero. I wish this new feature in ver 2.2 will help my problem...unfortunately still cant. Do you have any suggestion?

Regards,
FS
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: NO FORMAT IN JS FORMULA

Post by support »

Sorry, don't have any suggestions for you at the moment.
User avatar
support
Site Admin
Posts: 6222
Joined: 19 Oct 2014, 18:22
Name: Sergey Kharchishin
Location: Russia, Evpatoriya

Re: NO FORMAT IN JS FORMULA

Post by support »

Ok, special for you, I have found the way how to use number format in form for this field type.
Files from archive replace to
js/main.js
includes\classes\fieldstypes\fieldtype_js_formula.php
Then click ctrl+f5 to reset cache for main.js and try again.

Please test with different number formats and let me know if it works ok now.

Updated archive (loaded wrong file)
Attachments
fix3.zip
(10.4 KiB) Downloaded 168 times
fahmisalim
Sponsor
Sponsor
Posts: 320
Joined: 12 May 2015, 08:33
Name: Fahmi Salim
Location: Indonesia BSD City
Company Name: AIMan
Contact:

Re: NO FORMAT IN JS FORMULA

Post by fahmisalim »

first show some error as picture below:
Screen Shot 2018-05-22 at 22.50.57.png
Screen Shot 2018-05-22 at 22.50.38.png
and It work well after browser history cleared

and in info page show as field, so I have two same number in info page :(

But thanks for your support

Best Regards,
Fahmi Salim
Post Reply