Welcome, friend! If you are looking for a custom calculator module for Joomla! you are in the right place! Just in three easy steps you can create a great calculator for your Joomla! 1.6+ site and you don't even need to know any PHP, CSS or HTML.

First of all, your calculator needs some fields. The visitors of your site will use them to input the data they want to process.

After defining the input fields you build the formula(s), which allow the calculator to get the correct result(s).

Finally you could write some text explaining the calculator output.

Test your new calculator and if you are satisfied download the generated Joomla! module.

You see it's easy! If you have any problems, you can always ask for help in the Comments section, follow the step-by-step Tutorial, examine the Demo calculators, or just Try again to build the calculator you need.

Average rate is 4.9 / 5Average rate is 4.9 / 5Average rate is 4.9 / 5Average rate is 4.9 / 5Average rate is 4.9 / 5(67 votes)

Do you have any troubles using the site?

Do you like your new calculator? Did you manage to create and install exactly the one you need?

Please, leave your comments and suggestions here:

Andrew

16 October 2012, 19:08
The new version of the Calculator Generator is online! Tell me what you think :)

What is new in the v1.1:
- change the calculator button label
- change the fields order
- copy fields and functions
- use advanced math functions: floor, round, power, root, modulo, random, date
- actions for advanced users: save and load a plain text config file
Fixed bugs:
- correct display of "|" in the Result field
- "%" in the result text now does not corrupt the language file
- automatically add a multiplication operator (*) if an operator in a formula is missing.

You can see the comments on the previous release by clicking the link Older Comments in the upper right corner.

Ward

19 October 2012, 17:03
Hi Andrew
great solution now i can make farmers calculate the profitablity of an other crop by their own numbers. I could make the zip file and upload it, but when I make a module and save it and connect the module to the exact pages nothing happens and the module dessapaers. Do you see the problem?

Andrew

19 October 2012, 17:24
Hi Ward,
I checked the last generated calculators and find one with an extremely long name. Is it yours? If so, try to generate it again with shorter name. I can't say if this is the problem but I didn't find anything else in the structure of the calculator.

Ward

19 October 2012, 23:11I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew
Thanks a lot. This was the problem, now it works. Great tool!

Gui

20 October 2012, 18:31I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
HI!

First of all: Great tool.

What I would like is to present fields dependent on the choice made, field a =1 present field c, field c=1 ==> present field f etc...

Andrew

20 October 2012, 20:41
Thanks, Gui
Your idea is great, but it will require javascript to be included in the generated module. That's something I prefer to avoid because not every Joomla instalation has the same js library. Also the calculator module could become in conflict with another js plug-in.
May be I will add js functionalities in some future version of the generator but I have no exact plans yet. Your proposal will definitely be included in such a version.

Andre

26 October 2012, 22:38
Hi Andrew,

I have two quick questions... Or rather, I hope they're quick questions. :)

- What would be the best way to require each input field to have a value before submitting the form?
- How would you recommend I add an image to the results output?

For the image, I was considering simply adding another text result field that I could print into a class attribute in the PHP template, then use CSS to assign a background image to the element, but I'm not sure if your module perhaps has a better way to do that. I am familiar with PHP, but not too familiar with Joomla.

What do you think?

Andrew

26 October 2012, 23:31
Hi Andre,

- How would you recommend I add an image to the results output?
This is the easier question. You can use HTML tags into the result field. For example you could write:
<img src='url_of_an_uploaded_image' />
or use an id with a div tag like:
<div id="my_image"></div>
and then add a background in CSS: url, width and height of the image you've uploaded somewhere on you site.

- What would be the best way to require each input field to have a value before submitting the form?
This is the tricky one. If you want the form to check if the required fields are filled in and does not submit at all, if they are not, you will need some javascript. You could modify the "mod_your_module_name/tmpl/default.php" file of your module (after downloading it) and use the Joomla methods described here: http://docs.joomla.org/Form_validation.

Andre

26 October 2012, 23:56I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Awesome, that's great. I was trying to decide between a 4 or 5 star rating, but I'm definitely going to be using this generator for a few other projects in the near future.

Thanks for the prompt and helpful response. :)

Andre

26 October 2012, 23:58
Sorry, got my words a bit mixed up there... Meant to say I'm loving the options and flexibility in this module, I'm definitely going to use it again.

Andrew

27 October 2012, 00:30
Thanks Andre
I am glad you like it.

Elizabeth

29 October 2012, 19:19
Hello,

Quick question.. When I upload the module, it says "Warning: Division by Zero in ..." but I do not see anywhere that I am dividing by zero. Could you help?

Andrew

29 October 2012, 20:28
Hi, Elizabeth
The reason for the warning could be a dividing by an input field. For example: Result = 10 / numFieldX. Your PHP processor decides that numFieldX could be zero (and it is quite right because if the user doesn't fill out the field it will be evaluated as zero) and displays the warning. This won't mess with the calculations but the warning will be displayed.

- You can just turn off the warning (open php.ini file on your server and change the row "display_errors = On" to "display_errors = Off". This is the Joomla recommended value for production sites).

- If you can't edit your php.ini file, modify the calculator by creating a middle result which adds some value to the field you want to divide by. For example: Result1 = numFieldX+1

This will fool the PHP processor to think that Result1 couldn't be zero. Then edit the main formula like this: Result = 10 / Result1 and the warning will be gone. Of course, you have to be careful not to change the final result your calculator will produce.

If you can't be sure the user will always enter a value into the divisor field you have to add a conditional statement to the middle result. Otherwise PHP will display the Division by zero warning in case Result1 becomes zero.

Theo

03 November 2012, 09:57I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Work like a charm. I can't thank you enough for this amazing module!

FJ.Rubio

03 November 2012, 18:02
Hi, :-)
Mi calculator module works well in your "test" page, but not in my Joomla.
In my web the module does not show the Calculator Button
You can see in http://procesalistas.es/index.php/articulos/opinion
Any idea?

Andrew

03 November 2012, 20:11
Hi, F.J.Rubio

In your page there is an additional span tag around the calculator button <span class="art-button-wrapper"> It is styled with positon: "relative" so the button is aligned to this wrapper and not to the original form tag. The span also has no width and an overflow set to "hidden". This means that everyting inside the span will be hidden including the calculator's button.

You could:
- remove the wrapper
- or style it with an appropriate width
- or change its overflow from hidden to visible

Josh

08 November 2012, 00:06
Andrew,

I created my calculator and tried to install it on my Joomla 1.5 website using the extension manager installer and it gives me the following error message "Error! Could not find a Joomla! XML setup file in the package." Do you have any ideas how I could fix this problem and get the module installed properly?

Andrew

08 November 2012, 13:57
Hi, Josh

the Generator supports Joomla 1.6+ sites only. I don't know what is the desired structure of a Joomla 1.5 module. I am sorry you can't use your calculator with your site.

FJ.Rubio

09 November 2012, 00:58I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Thanks Andrew,
Now it's working, awesome module
You can see in http://procesalistas.es

Andrew

09 November 2012, 11:11
The new styles of the calculator fit perfectly to the site. It's great!

Adonis

20 November 2012, 22:40
Hello,
Very good module, but I can't make modifications in css after installation in joomla...

Andrew

21 November 2012, 00:53
Open this file on your Joomla installation:
your_joomla_site / modules / mod_your_calculator_name / tmpl / css / default.css
Edit and save, then refresh.

Robert Eikelboom - WiserAngels

21 November 2012, 03:31I rate this service with: Rate 4 / 5Rate 4 / 5Rate 4 / 5Rate 4 / 5Rate 4 / 5
Hi,
I think the module shows big promise. Would it be possible that users submit their input and results in a database or to submit them via mail? In this way we can use the calculators to harvest the collective intelligence. If possible woooow. Thanks

Andrew

21 November 2012, 11:12
Thank you, Robert, for your ideas.

It is possible to send the user inputs and results to an e-mail address. I will try to include this in the next version.

Storing the results into a database will change the basic structure of the Generator. It won't produce a tiny calculator module but a much bigger survey component. May be some day I could write another generator with such functionalities.

Adonis

23 November 2012, 14:40
Thank you for pointing me, but I can't find a way to align boxes to left.

Andrew

23 November 2012, 18:29
Hi, Adonis
I really can't give you an advice how to style you module. It depends much on the design of the site and your requirements. You could try to delete all the styles from the deafult.css file and write your own from scratch, so you will be able to position all the elements the way you want them.

Adonis

26 November 2012, 16:25
I found a way to align them, still the Get results button is erected all the way up inside modul. Pls check the site: http://www.fullcolor.ro/calculator-de-preturi.html

Andrew

26 November 2012, 17:33
Hi, Adonis,
your template css file is styling the elements with class .button with "height: 100%". This causes the calculator button to stretch 100% to the top.
You could:
- remove the 'class="button" ' from this module file: your_joomla_site / modules / mod_your_calcualtor_name / tmpl / default.php
or
- add an appropriate height to your module css like: "#calc-button {height: auto;}"

Adonis

27 November 2012, 17:34
Great tool. You can add a forum component on your site, there are much to discuss and share.
Thank you!

Derick Smith

27 November 2012, 22:37I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Looked everywhere for a suitable module with no success. Your generator solved my problems with very little work. Thanks a million:)

Herman von Straate

29 November 2012, 08:47
Awesome tool! Thank you so much!

Natalia Lee

30 November 2012, 23:25I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Great module ! Thank you

Deanna

07 December 2012, 19:36
Great module, thank you!
1. How would I change the "Get Results" button from red to blue?
2. I'm seeing a yellow rectangle at the beginning of each sentence where the user would enter a figure. How can I remove the yellow rectangle?

Andrew

07 December 2012, 20:11
Hi, Deanna
You can change any color, font or position of the calculator elements by editing the module css file:
your_joomla_site / modules / mod_your_calculator_name / tmpl / css / default.css
For example:
1. Add at the end of the default.css file this line:
#calc-button {color: blue;}
2. Add at the end of the default.css file this line:
#calc .calc-input>label {border-left: none;}
Save default.css file and refresh your site.

Deanna

07 December 2012, 21:25
Hi Andrew,
Thank you so much for the quick response. I was able to change the color from red to blue, but changing the border-left to none didn't get rid of the yellow rectangle. Is there anything else I can try?

Andrew

07 December 2012, 22:16
Hi, Deanna
The only yellow element in the calculator default design is the left border of the labels. May be you didn't target the labels right. Try to add a style like:
#jform_your_variable_name-lbl {border: none;}
Don't forget to insert the name of your variable in the code above.

Deanna

08 December 2012, 00:52I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew,
I tried just taking out -left and it worked!
Thanks again for all your help, and a great module!

SUNIL CHANDRA DAS

11 December 2012, 13:58I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew, The application is great!Can you make me a custom calc module with six parameters of numbers and date?It would be so much better if the input and output can be inserted in a database for online usage.I will appreciate to pay for it.I will send detail upon receipt of consent if any,My email is:communex@gmail.com

mel

11 December 2012, 18:48
Not sure what I did but I installed the module successfully but when I go to set it up in module manager there are no options or parameters on the right hand side to configure. Am I missing something? I use Joomla 2.5

Andrew

11 December 2012, 19:06
Hi mel,
I don't understand what kind of options do you want to configure? This site generates a module which is preconfigured by you before download. Please, check the Step-by-step Tutorial for a detailed example of such configuration.

Justin

20 December 2012, 17:07I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
This is a fantastic tool! Thank you for building it. Is there a way to do AND / OR logic within the conditionals? Thanks again for such a great facility.

Andrew

20 December 2012, 21:10
Thanks, Justin!
You could use the general condition structure to achieve AND / OR logic. For example:
1. If you want to test X=3 AND Y=5 create two nested conditions:
if (x=3) {
      if (y=5) {
          do something
      }
}

2. If you want to test X=3 OR Y=5 create two parallel conditions inside a separate formula then test the result:
Z = if (X=3) { +1 } if (Y=5) { +1 }
if (Z>0) { do something }

Mike Roberts

22 December 2012, 07:41
This calc builder is awesome. Can it be used on Blogger as well as Joomla? Thanks.

Andrew

22 December 2012, 16:52
Thanks, Mike!
No, the Generator does not work with anything else except Joomla 1.6+ Sorry

Jonathan Colson

26 December 2012, 00:10I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Where can I alter the results block AFTER I have installed the module on my website (which file do I edit).

Jonathan Colson

26 December 2012, 03:13I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
It would be even more amazing if you allowed us to create accounts and save our calculations to edit later.

Giuseppe

26 December 2012, 12:27I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi,
compliments for the application, is fantastic. Unfortunately I have a problem on a particular site. When I click the button the calculation script leads me to an error page. I try to explain ... The web page on which you installed the module is this http://www.spedizionidagliusa.com/preventivi.html When I click on the button "calculate" directed me to this link http://www.spedizionidagliusa.compreventivi.html
In practice, it puts the "/" between "com" and "preventivi.html" What causes the error? The same module of course works regularly on other sites. Thanks and sorry for the bad English
Using Joomla 2.5.8 and PHP 5.3

Andrew

26 December 2012, 16:45
Hi Jonathan,
you can edit the result texts from the language file of the module: your_joomla_site / language / en-GB / en-GB.mod_your_module.ini (you can use any text editor to edit this file)

I was thinking to create site accounts but then decided that people have so many usernames and passwords for different sites so if I can spare them one more I better do it :)
You can save your work by clicking Advanced Actions and Save Config button. When you come back later go to Advanced Actions again and load the previously saved config file. (You can also edit the config file with a prefered text editor if you like)

Andrew

26 December 2012, 17:46
Hi Giuseppe,
I am not sure what causes your problem. What web server do you use? Apache or IIS? If it is IIS, I guess the problem is in the Joomla class JURI which tries to guess the address of the calling page. It is not a good idea to mess with the Joomla core, so I suggest you to open this file of your module:
your_joomla_site / modules / mod_your_calculator_name / tmpl / default.php
and replace
htmlspecialchars(JFactory::getURI()->toString())
with
htmlspecialchars("https://www.spedizionidagliusa.com/preventivi.html")

Unfortunately if you move the module to another page you will have to change the URL again.

Giuseppe

27 December 2012, 01:46I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Thanks for all. Now work correctly.

Gabor

27 December 2012, 06:54
Hi Andrew,

your calculator is amazing. Congratulation for that. :)

I got some question, which I didnt found the solution:

some technical info:
Actually I plan to make a calculator for swimming pool. In my plan if a user type the parameters of the swimmingpool (height, width, deep, interrior or exterrior, ect), than get results abut the right pump capacity, but also the right filter size, and heater capacity. Maybe also with exact product types.

So practicaly:
the user fill the necessary fields, and get 3 different results in one module.

1. It is possible to generate with one calculator more different results in different unit?

2. It is possible to attach - as an additional content - to the result HTML field? So the system offer exact products to the results? Example the result of pump capacity is X. And make for that an interval if X is between Y and Z than attach the specific HTML content. If its possible, maybe its possible to use in a webshop as well, if the articles have a specification which can be positioning in the interval with its value, than the result could be a filter of the products.

It could be i go far with my imagination, but maybe its already a solved question, and you have already ideas, tutorial how to implement my plan. If it solved, it will be so kind to share it with me.

PS: sorry for my english, which is far no perfect. If something is not understandable feel free to ask me :)

thanks for your help. :)

Andrew

27 December 2012, 11:43
Thanks, Gabor!

And my answers to your questions:

1. Yes it is possible one calculator to produce two or more results (in any unit). Just create the desired number of formulas and then add them to the result field. Most of the demo calculators do so. For example you can check Days Converter Demo where there are 5 different results (and different units) for number of days, weeks, hours, minutes and seconds in a range of days.

2. Yes, you can add HTML tags to the output. To achieve your goal you will also need to set a conditional text results. Check the last paragraph of the Coin Flipping Demo and examine the way the result is formatted. Click the Result text button and add some HTML to the fields. For example, replace "You win!" with "<h1><a href="#">You win!</a></h1>". Then test the calculator and see what will happen when you win the game.

Alex

27 December 2012, 12:48I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Thank you! Quick and easy solution fo me.

Gabor

27 December 2012, 18:27I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
thanks for your reply,i will check the demos

TomVai

01 January 2013, 20:02I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Excellent Module Andrew. I have just one question. What do I need to change in the scripts so that the decimal letter is a comma instead of a dot. Because atm if a user writes 1,8 the script will treat it as a 18.

Andrew

01 January 2013, 22:07
Thanks TomVai

I fixed the issue and you can now generate your module again.

If you prefer you could open this file of your module:
your_joomla_site / modules / mod_your_calculator_name / mod_your_calculator_name.php
and replace all occurences of variables definitions:
$varYourVar=preg_replace('/[^0-9.\-]/','',$varYourVar);
with:
$varYourVar=preg_replace('/[^0-9.\-]/','',str_replace(',','.',$varYourVar));

Hans

01 January 2013, 23:25
Brilliant module! In addition to the last question (from TomVai) I would like to have the outcome of my calculations as decimal with always two digits behind the comma (e.g. 1.234,00). What and where should I change in the script?

Andrew

02 January 2013, 00:14
Hi, Hans
You can change the format of the output by clicking on the result name in the Result Text area (for example YourResult num). You could take a look at the last part of the Step-by-step Tutorial, but instead of choosing Text, choose Numeric and then the right format for you.

Hans

02 January 2013, 20:20I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Thanks Andrew! It works perfect.

anonymous

06 January 2013, 22:44I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew,

Another question raised:
I've got two date fields, one for arrival and one for departure, is it possible that, after entering the arrival date, the calender of departure starts at the arrival month?

regards,

Hans

Andrew

06 January 2013, 23:04
Sorry, Hans, this feature will need JavaScript and the generated modules don't support it. I am trying to keep the modules as simple as possible so they can be used with different Joomla installations without conflicts with other plugins.

anonymous

07 January 2013, 20:22I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew,

No problem. It is still a great module!

Thanks,
Hans

David

14 January 2013, 20:49I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew
Great module - I've used it to work out the cheapest route to a destination abroad by calculating fuel cost & ferry fare against distance. It all works fine, but for two things - when the button is pressed to work everything out the page jumps to the top, and the numbers/results stay until new ones are entered. Is there any way to prevent the jump to the top of the page, and to clear the results - a 'clear' button, perhaps?

Andrew

14 January 2013, 22:39
Hi David,
the page jumps to the top because the module refreshes the whole page after submitting the data and receiving the result. Only javascript based calculators can receive data without page refresh. This module don't use javascript so you can't avoid the refresh but you could force the page to scroll down to the calculator after the refresh.
Replace this code in your_joomla_site / modules / mod_your_calculator_name / tmpl / default.php file:
htmlspecialchars(JFactory::getURI()->toString());
with:
htmlspecialchars(JFactory::getURI()->toString().'#calc');

The generated calculators don't have an option for a 'clear' button (I could add one in the next release, thank you for the idea). If you think that it is better for your users to not keep the data at all, open this file:
your_joomla_site / modules / mod_your_calculator_name / mod_your_calculator_name.php
and replace every occurence of variable definitions:
$varYourVar = isset($form["varYourVar"]) ? $form["varYourVar"] : "";
with:
$varYourVar = "";

MHJL

15 January 2013, 12:15I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hey! Thanks for a great module, exactly what I was looking for! The only problem is that i've just finished my joomla 1.5 site, and cant bear the hasse to update it and spend hours to optimize the site. My thinking was that i'd make a blank 2.5 site to put the module up on, and then fetch the calculator through an iframe.. What do you think, will it work?

Andrew

15 January 2013, 15:14
I have no idea :) It should work as any other web content fetched through an iframe. I guess it will be a bit slow because you will have two Joomla sites to load and they are quite heavy.

Andriy

20 January 2013, 01:36
Hello :) Tell me please can i make on rent-a-car site, something like - online car request ???- and than calculate rate for selected days,---to see total.
Thanks

Andrew

20 January 2013, 11:31
Hi Andriy,
you can make almost any calculator you need for your site but it won't be an active order form. This means that your users will be able to calculate rates and totals but they have to use another module to send you (the site owner) their request and to pay the bill.

raj

21 January 2013, 01:37I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi, I could get module working like charm but I am facing some issues. Can you please help in it? I have calculator using in my site http://eborrow.in/ which is with gavick template but as soon you click on result, it close the pop up. Any help on this?

Andrew

21 January 2013, 13:06
Hi Raj,
when your page is loaded your calculator is hidden by the template you are using. The user has to to click a javascript button to see it. Since this is a php calculator it needs to reload the page to display the results and after the reload the template hides the calcualtor again.
So you have to deal with this issue through javascript. For example you could modify your template to hide the calculator only if the result value is 0. Or you could try to find a javascript based calculator which won't need to reload the page in order to display the result.

Jan

28 January 2013, 22:24I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Helo!
Maybe stupid question.. All demos calculator appears as graphic module with options to choose as text. It's possible between one question and next give image pics replacing text posssiblities?

Andrew

28 January 2013, 23:12
Hi Jan,
yes, you can show image instead of (or next to) the option text. You just have to use HTML tags where you need a different formatting or additional elements. In you case:
1. Click to add a "Choose field"
2. Write some label and click OK
3. Write a number in the Option ID field and in the Label field write this tag:
<img width="50px" src="http://upload.wikimedia.org/wikipedia/en/thumb/7/7f/Mickey_Mouse.svg/250px-Mickey_Mouse.svg.png" />
4. Finish the calculator and test it.
If you write the URL to the image above you will see a Mickey Mouse image as one of the options. Of course you have to write the URLs to the images you want to use as options in the calculator. You can upload them anywhere in your Joomla site and then write the correct URL in the img tag.

Tony

31 January 2013, 07:54
Not sure what I'm doing wrong, but I can't work this thing out.
I'm trying to make a simple calculator that you can select a wind strength in knots (ie 19) and then it gives a sail size in m2 (ie 4.5, 5.0, 5.6, 6.2). How do I go about this? I have looked at your examples and demos but I can't seem to get it to do anything really.
I'd love to also add a couple of other fields which would vary the answer, ie persons body weight, type of board they are using.
This is for a windsurf sail size calculator.
Thanks if anyone can help.

Andrew

31 January 2013, 10:40
Hi Tony,
I don't know anything about windsurfing but according to this site http://www.poolewindsurfing.co.uk/windsurfing-boards-windsurfing-sails-size/ the formula you need is:
(1.34 * Sailor Weight) / Wind
Follow these steps to build your calculator:
1. Select Number Field -> into the Label field enter "Sailor Weight (kg):" -> click OK
2. Select Number Field -> into the Label field enter "Wind (kts):" -> click OK
3. Go to the Formula panel and after "Result =" write "( 1.34 * "
-> click the "Sailor Weight" field
-> write ") / "
-> click the "Wind" field
4. Go to the bottom of the page and click "Test Calculator"
5. Test the calculator. Download it if you like it or add additional options and formatting.

Tony

31 January 2013, 13:16I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew,
I've used your suggestions above and this works great, although I've changed the multiplication factor to a more realistic one.
Now for the next step...
I've added a list field with four options to select from which is for the windsurfers level which will modify the result depending on their selection. ie 1 - beginner gives the standard result, 2 intermediate adds 10% etc.
How can I get it to add a percentage, each time I try it changes to +.1 or +.2 etc, I need it to vary the result by a percentage. Ideally I'd like it to change the multiplying factor (ie 1.34 in the above example) by a different percentage for each selection.
Thanks for your assistance, this is going to look great and be a hit on my website.

Andrew

31 January 2013, 13:28
Hi Tony,
X% is a mathematical expression of X/100. This means that if you need to add 10% of a value to the same value, you have to use this formula: result = value + 0.10*value
For more information you could check the Wikipedia article about percentage or a math textbook.

Tony

31 January 2013, 14:13I rate this service with: Rate 1 / 5Rate 1 / 5Rate 1 / 5Rate 1 / 5Rate 1 / 5
I don't think directing me to Wikipedia or a math textbook will help with how to enter it into your calculator, seems a strange comment to make.
Anyway, using the steps you've shown above, where is the 'value + 0.10*value' entered? I've tried it at the end of the formula without success. I've also tried to place it at the beginning of the formula where you have the 1.34 in the steps above but that brings up an error.
Any positive and helpful response would be appreciated.

Andrew

31 January 2013, 15:23
Dear Tony,
my advice was to check your math textbook in order to understand the way your calculator will work. If you don't feel the need for such knowledge just follow these steps:
1. Select Number Field -> into the Label field enter "Sailor Weight (kg):" -> click OK
2. Select Number Field -> into the Label field enter "Wind (kts):" -> click OK
3. Select List Field -> into the Label field enter "Skill level:" -> click OK
-> for Option ID enter 0, for Option label enter "beginner" -> click [+]
-> for Option ID enter 10, for Option label enter "intermediate" -> click [+]
-> for Option ID enter 20, for Option label enter "advanced" -> click OK
4. Go to the Formula panel and after "Result =" write ( (1.34 + 1.34 *
-> click "Skill level" field
-> write / 100 ) *
-> click the "Sailor Weight" field
-> write ) /
-> click the "Wind" field
5. Go to the bottom of the page and click "Test Calculator"
6. Test the calculator.

Tony

01 February 2013, 01:10
Thanks Andrew,
The calculator is great with this formula, much appreciated.
I've got a couple of other calculators in mind. I'll have a bit of experimentation with formulas to see what I can come up with.
Thanks again

Spliter

02 February 2013, 11:15
It,s awsome work whit this calculator. Even you don't need to be a programmer :) to work whit it. Can I ask :) for something. I have one small problem to build the calculator form that I want, may be because I'm bath in the math, logic and programming :). I give a small example logic and I will be happy if is possible. :)

Example:
Number field 1 + Number field 2 = result

If Number field 1 is

Zoli

03 February 2013, 10:24I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Dear Andrew,

This calculator module is great, finally i found it!

Please let me suggest some idea:

- print button (if i put this module into an article, i can add print button to the article, but not only for the module)
- some styling for the results: two column, 1 for results' fields name, 1 for results, so the results section will be clearer
- possibility for set Bold, Italic or Underline the results
- register on your pade and save the module, so if i want modify it, dont need to do the whole module again (if dont want register users, make possibility to upload back the module and edit it)

These are just ideas, but the calculator is great without these too, thank you for it!

Zoli

Andrew

03 February 2013, 11:04
Thank you, Zoli for your comment and suggestions.

You could add tables and style results using some basic HTML. Just click the Edit button of the result field and add the tags you need for bold, italic, ul, table, etc.

To save and edit your module later go to the Advanced Actions and click Save Config File button. The config file is just a description of your module in text format. Save it somewhere in your computer and when you want to continue your work, come back to the site and Load it.

Zoli

04 February 2013, 01:55
Andrew, thank you for informations, sorry for suggesting already done functions! I didnt noticed the Advanced Actions' at the bottom of the page...

I need some help:

1. I made a table with border at the results field. After calculating test at your page the table is there with border, but above there is a lot of 'br' tags. These line breaks appears on the test page here, and on my page too.

Here is the source code:

(check at http://pastebin.com/4LEB7FgA)

How can remove these line breaks?

2. On my page the table is there, after the line breaks, but has no border. When i wrote the html tags at the results field I wrote border="1" not "/1/". There is "/1/" at the source code of my page, not "1", and the border is not visible.

My results field when creating calculator:

(check linked config.txt or http://pastebin.com/4LEB7FgA)

3. My calculator has 2 number fields and 1 list field. If I make a calculation, after that I change the first field's number (I dont modify the 2nd filed) and calculate again a new result, the calculator duplicates the 2nd filed's number and calculate with the duplicated data.

You can check calculator at 'http://terburkolas.eu/hasznos/anyagkalkulator'

I uploaded the config txt file to our page, you can check it: http://terburkolas.eu/conf_mennyiseg_kalkulator.txt

Maybe my links help solve the problem, but if this post is not acceptable with links, please delete or edit it (after help :) )!

HTML tags are not appear in posts here, I paste it to http://pastebin.com/4LEB7FgA

Thank you, Zoli

Andrew

04 February 2013, 13:50
Hi Zoli,
I am always happy to recieve the users' feedback :)

To your questions:
1. The result field inserts a new line when it finds one. It doesn't matter if it is inside an HTML code or inside a plain text. So you have to remove all unwanted new lines from your table, like this:
<table border="1"><tr><td>Kikerülő föld mennyisége:</td> etc.

2. This is some kind of a bug, but unfortunately I can't say what causes it. May be it comes from your PHP version or configuration. The problem is that the result is stored in your module language file. The language file can't contain double quotes (") so I need to escape them with \. This works most of the time but obviously not in your case.
The easiest way to solve this issue is to replace all double quotes (") with single quotes ('), like this:
<table border='1'><tr><td>Kikerülő föld mennyisége:</td>
This will be ok with your HTML code.

3. Well, this is a feature not a bug (as some programmers joke ;) ). Examine the Unit Converter Demo and you will see that if you use the same name for a field and for a formula you can display the result inside the input field.
Because in your case you don't really want to use this feature you have to rename your formula "szegely" to something else. For example the whole formula could be:
szegelyR = szegely
Don't forget to edit your result field with the new name of your formula.

There is no problem for your comment to contain links. Quite the opposite, I very much like to see how my calcualtors are used :)

Jeff

04 February 2013, 19:21I rate this service with: Rate 4 / 5Rate 4 / 5Rate 4 / 5Rate 4 / 5Rate 4 / 5
Any way to start with default values filled in?

Andrew

04 February 2013, 19:26
Not yet, sorry

Mikael Karlsson

08 February 2013, 00:57I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hey, Thanx for a great module, It is awsome. There is one problem tho, I get an error on the front end saying: Warning: Division by zero in /home/mysite/public_html/modules/mod_counter/mod_counter.php on line 23

Mikael Karlsson

08 February 2013, 00:58
I forgott to ask how I fix it :P

Andrew

08 February 2013, 10:22
Hi Mikael,
I know about this issue but I can't find a way to fix it, because it's in fact the right thing PHP should do.
Here is my answer to another user, which I copied for you:

The reason for the warning could be a dividing by an input field. For example: Result = 10 / numFieldX. Your PHP processor decides that numFieldX could be zero (and it is quite right because if the user doesn't fill out the field it will be evaluated as zero) and displays the warning. This won't mess with the calculations but the warning will be displayed.

- You can just turn off the warning (open php.ini file on your server and change the row "display_errors = On" to "display_errors = Off". This is the Joomla recommended value for production sites).

- If you can't edit your php.ini file, modify the calculator by creating a middle result which adds some value to the field you want to divide by. For example: Result1 = numFieldX+1

This will fool the PHP processor to think that Result1 couldn't be zero. Then edit the main formula like this: Result = 10 / Result1 and the warning will be gone. Of course, you have to be careful not to change the final result your calculator will produce.

If you can't be sure the user will always enter a value into the divisor field you have to add a conditional statement to the middle result. Otherwise PHP will display the Division by zero warning in case Result1 becomes zero.

John

10 February 2013, 13:41I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi guys,

very great module!!

But I have a Question:

Is it possible to make two Dropdown Lists and link them together?

Like:

Country: Germany
State: Hamburg

but first I have to choose Country and then show the states in Germany.

I hope I could explain it.

Thanks so far.

Andrew

10 February 2013, 14:05
Hi, John
No you can't link two fields, sorry.
This feature requires the use of javascript inside the generated module, which I prefer to avoid.

Boris

10 February 2013, 23:29I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Great work, Andrew. Thought I spent much time to get the thing work exactly how I needed it to (having no programming skills at all), it is an easy tool to get the desired result.
I would like to ask the following - is it possible to make the module display two different results in step 3 depending on some argument of step 2? Meaning if I have a field "Number", and a person enters the number less than that expected or desired by me, the output result will be smth like "sorry, this is too small and I don't like it", otherwise it would display normal results from my formula.
Hope I made it a little bit clearer that a mess in my head :)

Andrew

11 February 2013, 00:30
Thanks, Boris!
Look at the Coin Flipping Demo. The output there is formatted the similar way. You just need to add a condition to the result output (click the num / text button after the name of your result). If the condition is true your text will be displayed, otherwise the default numeric output will be displayed.

Jan

11 February 2013, 18:02I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Dear Andrew!
Thx for suggestion about pictures. My calculator works fine (http://www.doormat4u.pl/index.php/nazamowienie). But I've question: it's possible to replace radio button by pictures with description on it or move from inline to bottom of picture ( radio button and descripton under the picture)? How do it?

Andrew

12 February 2013, 17:17
Hi Jan,
You can change any position, font, color, etc. of the calculator elements by editing the module css file:
your_joomla_site / modules / mod_your_calculator_name / tmpl / css / default.css
I am not a css expert, but I think you could use something like that to rearrange the position of your images:

#calc #jform_varRadioE>input,
#calc #jform_varRadioF>input,
#calc #jform_varRadioG>input,
#calc #jform_varRadioH>input {
     margin-top: 123px;
}
#jform_varRadioE label,
#jform_varRadioF label,
#jform_varRadioG label,
#jform_varRadioH label {
     display: inline-block;
     margin-top: 123px;
     width: 140px;
     overflow: visible;
}
#jform_varRadioE label>img,
#jform_varRadioF label>img,
#jform_varRadioG label>img,
#jform_varRadioH label>img {
     float: left;
     margin: -118px 0 0 -15px;
}

Lloyd

22 February 2013, 05:14I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew,

This is absolutely awesome. The calculator works exactly the way I want it to. Great work.

Rudolf

26 February 2013, 20:33I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi, Great work!
Much appreciated!

Jan

28 February 2013, 22:31
And I want to say THANKS Andrew!

Greg

03 March 2013, 05:32I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Simply OUTSTANDING !!!

Michael

04 March 2013, 02:15I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew

My site uses 2 of the calculators with different names in the same module position.

Their CSS ends up displaying the same, even though each is given the minor tweak of a different colored border.

Also, if I enter data into one and calculate, the result is that the other also displays the same data - although does not calculate.

Any thoughts on how to overcome this overlap?

Andrew

04 March 2013, 14:48
Hi Michael

all the generated calculator modules have the same structure in order to use the same css file. For example the main div element has an id = "calc". That's why you can't target your two calculators separately and to have different border. You could open your_joomla_site / modules / mod_your_calculator_name / tmpl / default.php file and add a class to the main div by replacing:
div id="calc"
with
div id="calc" class="different_calc"
Then open
your_joomla_site / modules / mod_your_calculator_name / tmpl / css / default.css file and add your specific border to the div.different_calc

If the two calculators display the same data you probably use the same field names (may be the default A, B, C notation?) When you generate the calculators you just need to give different names to the fields. For example A, B, C for the first calculator and A2, B2, C2 for the second.

Michael

04 March 2013, 18:00
Thanks Andrew - I'll do that and send you the final link when finished - great results so far

steve

04 March 2013, 18:19
can it do this:

a user (paul) can input, lets say, his name, height, weight and age into four input fields, then hit a "go" button.

the results that will be displayed will be something like this.

Paul weighs the same as 200 average potato`s.
if you stacked pauls on top of each other, you would need 17,000 pauls to reach the moon.
paul is 34 years old, this equates to 1072936368 Seconds.

cheers steve

Andrew

04 March 2013, 18:41
Hi steve

Of course you can :) You just need to build the calculator with your desired formulas. Please check the step-by-step tutorial for a detailed explanation how to set the formulas. The demo calcuators also contain very similar examples to your request.

steve

04 March 2013, 19:53I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
great, ive looked at the tutorials but i cant quite understand, if, lets say, a potato weighs 1 kg, and paul weighs 80 and i want to display how many potatoes paul weighs, what do i write?

ive tried following the "sailor" demo, and the advice you gave further up to Tony, but i keep getting a critical error..

steve

04 March 2013, 20:07I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
i donated in advance :-)

Andrew

04 March 2013, 22:04
Hi steve
Thank you for your donation :)

I thought your request is just an example, but if you really want to calculate the number of potatoes, follow these steps:
First you need to define the calculator fields:
1. Click Number Field -> Write into the Field label textbox: "Your Weight (kg):" -> click OK
2. Click Number Field -> Write into the Field label textbox: "Your Height (m):" -> click OK
3. Click Date Field -> Write into the Field label textbox: "Your Date of Birth:" -> click OK

Then build your formulas.
The first formula will calculate how many average potatoes (1 potato = 0.375kg according to the internet) the user weights.
4. Click "Your Weight" field you created in step 1 -> The formulas textarea now contains "Result = A".
5. Click at the end of the formula (next to A) until you cursor starts to blink there. -> Write "/ 0.375" Your formula now looks like "Result = A / 0.375".

The second formula will calculate how many users have to climb on top of each other to reach the moon (the average distance to the moon is (363,104,000 + 405,696,000) / 2 = 384,400,000 according to the internet).
6. Click Add Formula. -> A second formula appears "Result1 = "
7. Click at the end of the formula (next to =) until you cursor starts to blink there. -> Write "384400000 / " The second formula now is "Result1 = 384400000 /"
8. Click "Your Height" field you created in step 2. The second formula now is: "Result1 = 384400000 / B".

The third formula will calculate the number of seconds between the user's date of birth and the current date. A single day contains 24 hours * 60 minutes * 60 seconds = 86,400 seconds.
9. Click Add Formula -> A third formula appears "Result2 = ".
10. Click at the end of the formula (next to =) until you cursor starts to blink there. -> Write " ( today - " -> Your formula now is: "Result2 = ( today - "
11. Click "Your Date of Birth" field you created in step 3. -> Now your formula is: "Result2 = ( today|date - C|date "
12. Click at the end of the formula (next to =) until you cursor starts to blink there. -> Write " ) * 86400". Your third formula now is: "Result2 = ( today|date - C|date ) / 86400"

Finally you will do some formatting to the displayed results:
13. Click the edit button of the third textarea of the generator page.
14. Delete all the text you see there.
15. Write "You weight the same as " -> click the first formula (Result) you created in steps 4-5. -> continue writing " average potato`s". Insert 1 or 2 new lines.
16. Write "If you cloned yourself and stacked your clones on top of each other, you would need " -> click the second formula (Result1) you created in steps 6-8 -> continue writing " clones to reach the moon". Insert 1 or 2 new lines.
17. Write "You are " -> click the third formula (Result2) you created in steps 9-12 -. continue writing " seconds old."
18. Click the OK button of the result formatting field.
19. Click Result|num button inside the result text. -> Click OK in the pop-up box -> Select 1,000.00 as the number format -> Click OK.
20. Do the same for the Result1|num

And you are ready! Click Test Calculator. Make some tests and click Download Module if you want to use it on your Joomla site.

I generated a config file with all the described fields and formulas. If you have trouble building the calculator yourself, just save the config file on your hard drive (This is a plain text file. Right click the link and select "Save target as..." in order to save it instead of open it in the browser). Then go to the generator and click the Advanced Actions panel (at the bottom of the screen). Click Load Config File -> Browse... -> open the config file from your hard drive and the calculator will be loaded into the generator. Then you can modify or just download the module.

steve

05 March 2013, 14:47I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
hiya, i just donated again and have a couple of requests.

if i wanted to have several other weight comparisons, could i just add them via an excel type format instead of creating them one by one?
if so, can the output be something like this:

paul (username) weighs the same as:

200 potatoes,
5000 lego`s
100000 peas

oh, and the last thing, have large numbers as text, i.e.

43264454675757

forty-three trillion two hundred sixty-four billion four hundred fifty-four million six hundred seventy-five thousand seven hundred fifty-seventh

is it possible to make a volume formula too?

like, it would take 200,000 pauls to fill a soccer stadium

Andrew

05 March 2013, 20:46
Dear steve :)
You are very generous, thank you!

Unfortunately I you can't enter your data into a calculator from an excel file. If you need to add just these 3 to the calculations, it will be very easy to do so by creating 2 more formulas (I updated the config file for you to include legos and peas). If you need to add tens and thousands of such entries, please send me the excel file and I will transform it into formulas.

It is possible to display large numbers as text but the calculations are quite complicated. I made an example (you can download it here. It's a config file like the previous one, so right click the link, save it and load it into the generator). If you want to transform the numbers from your original calculator you would need to copy this set of formulas several times which is not very elegant solution. It will be better if I unite the two calculators into one module directly inside the php files. If you want this, please send me your calculator when you are ready and I will add the number-to-text transformation manually.

According to the internet, a volume of a human body is =weight/1000. If we take the Wembley Stadium which has volume of 4 000 000 cubic meters, we just need to divide 4 000 000 / (user's weight / 1000). I added this formula to your config file as well.

Richard

07 March 2013, 13:05
Hello Andrew
Perfect module and a lot of possibilities. While testing the module all looks perfect, but on my website I noticed a strange (.) in 'Uw besparing' www.pelletkachel-startpagina.nl Any idea where that could come from?

Andrew

07 March 2013, 15:34
Hi Richard
Thank you for the kind words.

The dot on your site comes from your base template css (plugins / system / jat3 / jat3 / base-themes / default / css / template.css) which defines a bullet to all list elements inside a column:
.column ul li {background: url("../images/bullet.gif") }

To fix this you have to modify this css file or the css file of your calculator.
For example, you could add to the your_joomla_site / modules / mod_your_calculator_name / tmpl / css / default.css file this code:
#calc-varNumA { background: none;}

Richard

07 March 2013, 16:31I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew

Thanks for the quick follow-up and correct fix.

Mirco

11 March 2013, 16:53I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew,

veeery nice tool! thanks a lot for sharing.

I have one little Problem:
on my testing platform the calculator module works great. http://joomla.getup-media.de/

but on another website, the module dosent show the result or even does not calculate, and i can´t figure out why.
http://igelwirt.de/index.php/de/testseite

do u have any idea what the problem is?

Andrew

11 March 2013, 18:02
Hi Mirco,

I see you are trying to solve your issue right now (the site behaves different every time I open it :).

I don't find anything unusual in your module, except that you use very long names. I would suggest to generate the calculator again but with shorter name. If this doesn't work try to shorten the names of the variables too. If this also doesn't work try temporarily turning off the other form you have in the right column.

If nothing works please write me again and I will think of other possible sollutions.

Mirco

12 March 2013, 17:01I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hey Andrew, me again

i tryed a lot and even deleted most of the other scripts n stuff.
i can´t get it work.

i downloaded and tryed a simple 2-field-add-calculator with short names but it wont work at all.
it works fine on another joomla-website.

do you have any idea? you would help me a lot.

http://igelwirt.de/index.php/de/testseite

(sorry for my bad english spelling etc.)

Andrew

12 March 2013, 19:16
Hi Mirco,

I think the problem is in the server/PHP configuration. Your $_POST array is always empty.

I've never had such a problem, so I googled for a similar case and found this:
http://stackoverflow.com/questions/1282909/php-post-array-empty-upon-form-submission
http://www.od2dev.be/empty-post-array-issue/

Do you have access to your .htaccess file (if your server is Apache) or web.config (in case it's IIS)? Is it redirecting one address to another?

I doubt it will help, but you could try to open your_joomla_site / modules / mod_your_calculator_name / tmpl / default.php file and replace:
<form action="<?php echo htmlspecialchars(JFactory::getURI()->toString()); ?>" method="post"
with
<form action="" method="post"

I am sorry I am not of much help here. May be you should ask for assistance your hosting provider or someone with a full access to your server and the backend of your site.

Mirco

12 March 2013, 20:03
Hi Andrew

thx for your answer and time!
i do have access to the .htaccess and i removed it from the server.
the problem remains.

there is no redirection set (as far as i know)
i tried the replacement of but the problem remains.

i´ll contact my hosintg provider and report, when i find a solution.
another question: how can i see whether the post array is empty oder not?
I use firebug (on firefox) - does this tool show me the post array?

thx for your support.

Andrew

12 March 2013, 20:35
The $_POST array is where the submited data is stored. First the user loads the php page with the calculator form, fills it out and clicks the submit button. The data s/he entered is stored in this POST array and when the page is loaded again it reads the data and calculates the result. This happens in the site backend through php script.

Although I can't test it (because I don't have access to the backend of your site) I think the $_POST array is empty and not storing the data because in the module default.php file there is an if statement:
if (isset($_POST['submit_rechner'])) and in your case this condition is never true (if it was, the result will be visible, even if it's just zero)

Also in the module main php file there are similar statements which check the previously entered data. For example if the user's inputs were stored into the POST array the entered values would be filled in the appropriate input boxes when the calculator loads again.

Because of these two, I am sure that your POST array is empty. Unfortunately I can't say why...

Goldmark

14 March 2013, 06:09
This is a great service but only if you are willing to provide more help to those who need it. You should actually charge a small fee to help other create the calculator they need. I would gladly pay you for your help and assistance. I'm not very good with formula's...I know what I need but I have no ideal what to imput to create the proper formula.

Andrew

14 March 2013, 10:50
Hi Goldmark,

Thank you for your suggestion. I am trying to help all my users but can't dedicate myself to this project because of some family engagements. That's why I prefer not to set a fixed fee, but I will appreciate any donation the user could send for my assistance.

If you have a specific calculator in mind, please send me a description to my mail (jcg at andrewart.net) and I will return you the formula or a payment request if your calculator is too complicated.

anonymous

15 March 2013, 20:22I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Hi Andrew. You was created a great tool. Thank you. I create form and install it on me site. On the local site and the my web site. And it not work corretly. When i input data and press calculate nothing changing. But when I change module position calculator imaging previos data. http://strahowka.by/?Itemid=669. I'm not very good speak english. Sorry. Please help me.

Andrew

15 March 2013, 20:52
Hi, Максим

I tested the calculator on your site and it works ok now. Can you describe the problem again? You can write in Russian if you like. I will understand, although I will answer in English (my Russian is very rusty :)

anonymous

16 March 2013, 00:39I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Thank you for answer. I solved the problem. In the file configuration.php put caching wincache (was file). And all work good. Again thank you for the your tool! Its great! All the best to you!

RobRob

19 March 2013, 09:20I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Very fine, didn't take long to make my Calculator.
It would be very nice, if the result could be put in a better shape. Or if you could make some words bold in the Text, or right adjusted ...
Anyway excellent

Andrew

19 March 2013, 15:03
Hi Rob and thank you.
You can format the result (or the field labels) with HTML tags. Just click the Edit button of the result field and add the tags you need for bold, italic, ul, table, etc.

You could also modify the whole appearance of your module by editting your_joomla_site / modules / mod_your_calculator_name / tmpl / css / default.css file

RobRob

19 March 2013, 17:51
Thanks - I'll try (later) - So far I am still in the Construktion-Mode, where the Figures are more important, but this design-time will come!

RobRob

20 March 2013, 00:57
The thing I woul like most do get a proper format was the table-tag.
Unfortunately the tabel is dropping down, outsite of sight, the biger it is, the more it goes down.

Can you give me an advise?

Here an example:

=====================

calc_name:
tabellentest

***---===------===---***

calc_fields:
Spalten|:|Wieviele Spalten|:|num|_|
Zeilen|:|Wieviele Zeilen|:|num|_|

***---===------===---***

calc_formulas:
Result#1_
Result1#2_
Result2#11_
Result3#12_

***---===------===---***

calc_result_text:



 Result: |#Result#num#|
Result1: |#Result1#num#|


 Result2: |#Result2#num#|
 Result3: |#Result3#num#|









***---===------===---***

calc_result_formats:

***---===------===---***

calc_button_label:
Get Results!

RobRob

20 March 2013, 01:01
Sorry the lines with table-tags are cut out, when submitted

Andrew

20 March 2013, 15:53
I can't see where are your table tags, but I guess you have the same problem as Zoli (check the comments from 04 Feb 2013). Here is the solution:
"The result field inserts a new line when it finds one. It doesn't matter if it is inside an HTML code or inside a plain text. So you have to remove all unwanted new lines from your table, like this:
<table border="1"><tr><td>Kikerülő föld mennyisége:</td> etc.

RobRob

20 March 2013, 18:42
I'll try - thanks so far.

Andrew

20 March 2013, 22:44
Thank you Rob, for the kind words and for the donation.
I am glad you like my calculator generator :)

costy

22 March 2013, 14:53I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Good job! keep going!!!

RobRob

24 March 2013, 11:30
Hi Andrew - it was a plessure. I have just one final question: Why is it, that the calculation-button does not appear in the sheet on the homepage?

Andrew

24 March 2013, 11:44
Hi Rob :)
It could be some css conflict (may be your site template is overriding the calculator css). Can you give me the link to your homepage to examine it?

RobRob

24 March 2013, 12:34
www.business-papas.at

Andrew

24 March 2013, 19:46
Hi Rob,
your template css (businesspapass4) adds a span wrapper around all the buttons on the page. It moves the calcualtor button to the left and behind the left column. I suggest you to add these styles to your calculators your_joomla_site / modules / mod_your_calculator_name / tmpl / css / default.css file:
#calc>form>span.art-button-wrapper {
     position: static;
     display: inline;
     height: auto;
     width: auto;
     overflow: auto;
     z-index: auto;
}
#calc>form>span.art-button-wrapper>span {
     display: none;
}


Try this and tell me if it works.

RobRob

24 March 2013, 22:13
Sorry didn't work

Andrew

25 March 2013, 00:15
Did you make the change on your site? Because I still see the "position:relative" style on the span element here: http://www.business-papas.at/index.php/online-rechner-fuer-steuer/online-rechner-fuer-steuer
You need to open (or download) the calculator "default.css" file (http://www.business-papas.at/modules/mod_calc1357/tmpl/css/default.css), paste these styles and save (upload the file to the server again)

RobRob

25 March 2013, 08:25
Yes it works, but it is very difficult, to get this into this css-file. Can you include it on your homepage, so that it is added every time?

RobRob

25 March 2013, 08:54
Unfortunately it happens in one module, that this new button is above the field, where you have input one figure. On ipad this cannot be changed. In windows I can (if I know the trick) change the size of the window and the field is accessable.

RobRob

25 March 2013, 08:59
On the other hand - in windows the button reaches from top to bottom, which is also not very helpful.

RobRob

25 March 2013, 09:01
Is there a way how I can change my own css-file of my template?

RobRob

25 March 2013, 09:05
This is standing in my template-css-file:

span.art-button-wrapper
{
vertical-align: middle;
display: inline-block;
position: relative;
height: 29px;
overflow: hidden;
white-space: nowrap;
text-indent: 0;
width: auto;
max-width:1920px;
margin: 0;
padding: 0;
z-index: 0;
}

Andrew

25 March 2013, 17:38
Hi Rob! Sorry for the delay.
Yes, you can change your site template the same way you changed the calculator template. I wouldn't recommend it though, because you could mess with the formatting of other buttons on the page and also it will make the update of the template very difficult.

Please, open the calculator "default.css" file (http://www.business-papas.at/modules/mod_calc1357/tmpl/css/default.css) again and replace these styles:
#calc-button {
     color: #900;
     border: none;
     border-radius: 9px; -moz-border-radius: 9px; -webkit-border-radius: 9px;
     background: #ddd;
     cursor: pointer;
     font-weight: bold;
     font-size: 1.2em;
     text-align: center;
     margin: 1em;
     padding: 0.5em;
     position: absolute;
     bottom: -2em;
     right: 1em;
     height: auto;
}

with:
#calc-button {
     color: #900 !important;
     border: none;
     border-radius: 9px; -moz-border-radius: 9px; -webkit-border-radius: 9px;
     background: #ddd;
     cursor: pointer;
     font-weight: bold;
     font-size: 1.2em;
     text-align: center;
     margin: 1em !important;
     padding: 0.5em !important;
     position: absolute;
     bottom: -2em;
     right: 1em;
     height: auto;
     top: auto;
     line-height: inherit;
     font-family: Arial, Helvetica, sans-serif;

}


This way we are overriding some of the wrapper formatting. It's not a good practice to use the keyword "important!" but since the site template is using it, we have no other choice.

P.S. About your request to add this modifications to all the calculators generated by my site: I can't do that, because most of the other users have other Joomla templates and this will be unacceptable for them. But you could make one default.css file for all your calculators and after installing a new calculator module to the site, just replace its original css file with yours.

RobRob

25 March 2013, 18:59
Works wonderful now, though it is a little bit inconvenient, because I have to do it everey time, I load a new version. But it works, that most important and I thank you.

Andrew

25 March 2013, 20:09
I am glad it's finally ok now.

The easiest way to keep this design every time you load a new version is:
1/ To save the modified default.css file on your hard drive.
2/ When install a new module (or update an old one) upload the saved file to the server in this folder:
your_joomla_site / modules / mod_your_calculator_name / tmpl / css /
to replace the default file.

BTW why don't you try another template for your site ;) This one is very aggressive and could mess with other modules in the future.

RobRob

26 March 2013, 00:04
To change the template is not an option at the moment.

By the way I used the above mentioned method to include the css-file, before I read your lines.

I hope you appriciate, that I made a link after everey calculation-sheet. :-)

Andrew

26 March 2013, 10:20
The link is great, thank you!
I am very glad you find the generator useful and that you managed to create such a complicated calculator.

RobRob

27 March 2013, 01:02
Could you look to this page?

http://fofos.at/solocomrechner.html

Is there any possibility, to come to a better look, like in this example?

Andrew

27 March 2013, 15:39
Oh, you don't like my default design? ;)
You can change almost anything by modifying your_joomla_site / modules / mod_your_calculator_name / tmpl / css / default.css file

I don't know what exactly you want to change.
For example you could add
#calc { font-family: verdana, tahoma, helvetica, sans-serif } to set the same font as the example you like.
Or remove the #calc-button {...} styles to use the default browser button as the example does (Although, because of your template, this won't be enough. You have to edit the button styles of your template too)

RobRob

27 March 2013, 15:47
The font is ok with me, but, how could I possibly format the input-field-section, so that there is a perfect column - right- adjusted for the numbers, which are to be typed in. and a second column: right- or left-adjusted, where the leading text will stand. The output, I can pack into a table. Is not perfect, but acceptable.

RobRob

27 March 2013, 15:48
Additionally I want to state, that I am not experienced enough, to make major changes in the css-file.

Andrew

27 March 2013, 16:11
How about this:
add these lines at the end of your default.css file:
#calc {
     max-width: 650px;
}
#calc .inputbox, #calc .calc-input>select {
     margin: 0.5em;
     margin-right: 0;
     float: left;
}
#calc .calc-input>label {
     display: block;
     float: left;
     max-width: 500px;
     padding: 0.5em 0;
     text-align: right;
}

Andrew

27 March 2013, 22:44
Oops, sorry. I found an error. Please, try this code instead:
#calc {
     width: 650px;
}
#calc .calc-input {
     clear: both;
}
#calc .inputbox, #calc .calc-input>select {
     margin: 0.5em;
     margin-right: 0;
     float: left;
}
#calc .calc-input>label {
     display: block;
     float: left;
     width: 500px;
     padding: 0.5em 0;
     text-align: right;
}

RobRob

28 March 2013, 00:34
thanks very much - that will do. I've just do add a text at the end of the inputsection, because the button to calculate is over the last field, but I'll manage this.

Bianca

28 March 2013, 17:40
Hello,
The module looks great! And i think it's perfect why i need it for. Only i try different things but i cannot get the results.
I hope you can help me with the formule.

People write the date when they will start
Then it count 1001 days up.

Result will be the date in the future.

to abstract: date + 1001 days = result: date in future

======
Field A: Date field

Result = Adate if A is >1001 +1001

======

Is this correct or do i something forget or wrong?
My english is not very well, so i hope you understand.

Andrew

28 March 2013, 19:08
Hi Bianca,
if I understend correctly you just want your calculator to add 1001 days to the input date. This is very simple:
1/ Create the input date field
2/ Click on it -> the input field appears into the Formula textbox
3/ Write next to it +1001
4/ And you are ready! Click Test Calculator and test.

I don't know why are you comparing the date against 1001 (if A is >1001)... This way you are adding 1001 to the date only if the date is bigger than 1001 which is also ok (unless the user enters a date before the year 1602 ;) ) but it's unnecessary.

Your formula should be just: Result = A|date + 1001

vanman

29 March 2013, 08:41I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
How do you use the power function? as in to the power of x. PHP it's pow(x,n) I want to do a compound interest which is returnoninvestment= principle x (1 + rate) ^years. I tried a number of ways but the calculator didn't like the syntax.

vanman

29 March 2013, 10:57I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
MODULE NOT SHOWING IN JOOMLA 2.5.9
I downloaded mod_1yearroi_calc_1364542054.zip and placed it on my joomla, made it public, and enabled it and gave it a position name of 1yrroi. I couldn't get the module to show using normal position methods so I made a menu that linked to an article the contects of which were {loadmodule 1yearroi_calc} . this didn't work either, even though using {loadmodule mod_login} or other modules did load fine. I also tried to put in the article {loadposition 1yrroi} linking to the position i put in the calc module, but that didn't work either. I am using the latest joomla 2.7. So it seems like the modules I download from here are being acknowledged, shown in the list of modules, but not activating the calc module.

Andrew

29 March 2013, 11:38
Hi vanman,
to use the power function:
1/ select "power" from the Math menu in the right corner. A small table appears.
2/ Delete 0 from the left box and write: 1+ then click the "rate" field/result
3/ Delete 2 from the right box and click "years" field/result

The modules are tested and work in Joomla 1.6 - 3.0. To install a module follow the standard steps:
1/ Upload the zip through Extension Manager
2/ Open the installed module in Module Manager
3/ Select a visible position of your site template; select published status; select specific pages or "On all pages" from Module Assignment
4/ Save the changes

vanman

29 March 2013, 11:47
Before you responded I already figured out a bug I had in my copy of joomla and got the module to show. For the benefit of others what I was trying to do the first time was simply show the module in a particular position by selecting the module, selecting the position inside the module edit screen, then select the security to a particular menu item will allow the module to show at that position when the user clicks that menu item. My guess is {loadmodule or loadposition doesn't work, is incompatible with some modules.

vanman

30 March 2013, 03:26I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
I feel so silly. I was using a modified browser designed to block the glare since I spend hours in front of this screen, so when I switched browsers I could see the math button you referred to fairly obvious on the right browser. I also solved the joomla issue. Thanks for your great component!

RobRob

03 April 2013, 01:03
In the meantime my sheets are growing. The reason is, that the laws for our taxes and sozial insurances are so difficult!
For me it would be very good, if I could print out the programm-code, as it is seen on the monitor. (The txt-files are not easy to be understood.
Is there any chance to print this out? (at the moment I have to make several screen-shots - is also not very convenient)

Andrew

03 April 2013, 14:20
Hi Rob,
there is no special way to print the generator's interface. Can you just use to the Print button of your browser? I tried it with Firefox 15 and Internet Explorer 10. They both seems to render the formulas correctly (may be IE10 is better, because Firefox sometimes cuts parts of the long formulas).

RobRob

03 April 2013, 15:25
It works better in IE than in Firefox, but still - because you limit the width of the column - some parts are cut off.

Andrew

03 April 2013, 15:43
You could try to disable CSS and then print the page. It will be quite ugly but nothing will be cut off...

Ian

09 April 2013, 11:20
Hi Andrew - this super plugin appears to be perfect for what I need, but my maths isn't up to making it work :-(
I'm trying to set up a simple loan repayment calculator using the standard formula:
P=r(PV)/1-(1+r)-n where P=Payment, PV=Present value, r=rate per period and n= the number of periods.
I don't understand the formula in the first place and clearly I'm entering it incorrectly into your generator because I'm not getting sensible results when I test it. Have you any idea where I'm going wrong? I've named it Loan repayment calculator.
Many thanks

Andrew

09 April 2013, 12:24
Hi Ian,
I don't know much about loans either, but I found this site on the Internet
It explains the formulas for payment, loan amount and term. I don't know what exactly are you trying to calculate, but if you want to use the formula from the example, you have to:
1/ create 3 input fields for your calculator (loan amount, interest rate, months)
2/ create a formula to get the periodic rate: interest rate / 12 / 100
3/ create a formula to get the payment amount (monthly): loan amount * (periodic rate / (1 -
select the power function from the Math tab in the upper right corner and the table will appear. Write into the left box:
(1/ (1+periodic rate))
and into the right box click the months field:
months
finish your formula with:
))

The second formula gives you the monthly payment. If you need the total payment (for the whole loan period) you need to multiply the monthly payment by the number of months. If you need something else... well you have to decide what is it :)

Ian

09 April 2013, 18:07
Hi Andrew - thanks a million for getting back to me. I can't believe you responded so quickly!
I'm struggling with the monthly payment amount, and probably more as well - my maths ended with the 12 x table, and algebra went strait over my head.

I've created the periodic rate formula, but I can't see how to add the it to the equation. I've tried clicking on the formula with no success - should I type in the name?

Andrew

09 April 2013, 18:26
To add one formula in the calculation of another just click anywhere over the first formula while the second is in edit state.
Did you read the Step-by-step Tutorial? There you will find screenshots and more detailed explanations of all the actions you need to execute to generate a calculator.

Ian

09 April 2013, 18:30
I did - but got confused. I will go back and try again. Thanks again for your help on this.
If I can get this one working and demonstrate it to my client, he will want a more complicated version. What would you charge us to put it together for us if he supplies all the formulas (he's cleverer than me)?

Andrew

09 April 2013, 18:54
It depends on the formulas :) If it's possible to generate the calculator without editing the module code (which means: no loops, no special design) I can make it for free (of course I am always glad to recieve a small donation from my happy users :)

Andrew

09 April 2013, 19:06
Dear users,

I am expecting my first child next week! After her birth I won't be able to respond so quickly to your questions and I apologize in advance. Please, continue to post your comments and I will try to read them at least once a week.

Ian

09 April 2013, 19:24
A donation would be very much in order! Congratulations on the forthcoming event :-)
I've read through the step by step again, and tried to follow your instructions to the letter, but I'm still getting critical error messages. Looking at the formula I seem to have a stray semi-colon in there, and I'm not sure about the large brackets surrounding the power element.
As it is, I struggle to do the sum each time to post a reply. I have three grandchildren by the way, so I'm old enough for my brain to have slowed down even more...

Andrew

09 April 2013, 19:44
Thank you, Ian :)

I checked your last test. You are missing two open brackets.
A * ( Periodicrate / ( 1 - power table [ ( 1 / ( 1 + Periodicrate ) ) | C ] ) )
The second is not mandatory, but since you are closing the brackets you need to open them first ;)

Ian

09 April 2013, 20:33
Thanks Andrew - I'll try it out shortly. Are you in the UK, by the way? And how do you manage to do all this for free? And can you see everybody's attempts as they try?

Andrew

09 April 2013, 20:49
I am not in the UK :)
(I didn't think my English is so good to fool anyone I live in an English speaking country :))) Thank you!)

And no, I don't save all users attempts, only those made in the last hour. This way, if the user leaves the site and comes back a little later, he won't lose his work. And since we are talking in real time I was able to check your last attempt.

Ian

09 April 2013, 21:40
Andrew - my last attempt still didn't work - I must try harder!
Your English is perfect
My maths is terrible :-)
I will try again tomorrow.
I have in the meantime commended you and your calculator generator to JoomlaBamboo specifically, and Joomla! in general. I hope it brings you donations.
Thank you again for all your help.

Andrew

09 April 2013, 22:12
Thank you for the recommendations! They are very helpful.
Don't give up! Your previous attempt was ok, you just had to add these 2 open brackets (I can't see your last attempt and can't tell what's wrong with it, sorry)

I made a config file for you. You can compare your attempts with it and see what you are doing wrong.
To use the config file:
1/ download it from here (right click the link and select Save as... to your computer)
2/ open the generator, scroll and open Advanced Actions
3/ load the config file from your computer to the generator
4/ examine the formulas, edit them if you need, test the calculator, download the module if you like it

Ian

10 April 2013, 13:15
Andrew thanks a million. It works brilliantly and you can see it here: http://www.financingfirst.co.uk/newsite/index.php/calculator

I'll get my client to explain to me exactly what he needs, and get back to you soon.

Meanwhile, I hope all goes well with the baby.

Thank you again for all your help...

Ian

10 April 2013, 13:16I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Definitely a five star rating :-)

Carlos

12 April 2013, 23:12I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
Great Module thanks.
Is it possible to choose a result based on 2 other results ? for example... result1= 5 result2= 10 result3=higher of result1 vs result2 which in this case is = 10

Andrew

12 April 2013, 23:17
Well, you could write a conditional statement like this:
result3 :
     if (result1 > result2)
          + result1
     else
          + result2

Carlos

12 April 2013, 23:39I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
It worked great !!! thanks so much

RobRob

20 April 2013, 00:06
Congratulations to your (already ?) first child. To inform us about the result is at least as important, as any other result here! :-)

Andrew

22 April 2013, 22:49
On 16 April 2013 my daughter Assia was born! She is at home now and we are trying to build the formulas for changing diapers, breastfeeding and bathing :)

Ian

24 April 2013, 17:40
Hi again Andrew - and congrats on Assia! I hope she's not keeping you awake too much :-)
My client is really impressed with your calculator generator. I will email you the Excel spreadsheet he has built to see if you could replicate it in your generator. All the formulae are open to see.
Let me know what you think...
Thanks
Ian

RobRob

28 April 2013, 11:26
Congatulation from me too. I hope you find a formula for sleeping the whole night through asap. ;-)

To Ian: I have solved Problems, where the formulas in Excel are to be solved with Iterations. For such formulars you have to calculate first the reverse formular, and afterwards it is possible ... From my experience you can solve everything. But you have to do it step by step.

RobRob

28 April 2013, 11:36
To Ian again: Here is an example, what I have already done with the Module: http://www.business-papas.at/index.php/online-rechner-fuer-steuer/online-rechner-fuer-steuer
On the homepage you can find an emailadress in the impressum. If you wish, you could send the excel-sheet to me, because I feel Andrew is a little bit busy with ASSIA. :-)

Andrew

28 April 2013, 22:34
Hi guys and thank you! Sleeping has a very difficult formula and I am still trying to invent it :)

It will be great if you can help each other!
I am checking my mail every day but don't have much time for anything else. Don't hesitate to ask questions, though. I will try to answer as soon as possible.

FromHeLL

29 April 2013, 19:19
Thank you for the module.
I have juste one question can I send the user inputs and results to an e-mail address??

Andrew

30 April 2013, 00:51
Sorry, FromHeLL
This feature is not available yet.

RobRob

05 May 2013, 14:07I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
I don't know how complicated it is in other countries, to calculate the sallery and all the taxes and so on.
In Austria it is very complicated.
Still I will have a calculator online soon.
But do not ask, how long I was sitting in front of this dummy-screen!

Chip

16 May 2013, 04:59I rate this service with: Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5Rate 5 / 5
can i add this to a site that is not joomla.
if so how.
this is just what i am looking for

Andrew

16 May 2013, 10:49
No, you can't. The generator creates only Joomla 1.6+ modules.
Sorry!