My form has four "Select from list" fields each with six options ranked 1 to 6. I want to have a field that shows the sum of these four fields divided by 4 (to have the average) and multiplied by 1.66 (to have a grade on a scale of 10). Can I do that?

Add a textfield (probably set it to read-only) and give it the name - not title - "result".

In the advanced tab for each select list, go to the Actionscript section, and then put a custom action on each select list:

To do that, go to the select-list element => advanced tab => Actionscript => click "custom" => check the "change" checkbox => click "create code framework".

Right after "case 'change':" put this:

ff_getElementByName('result').value = ( ( Number(

ff_getElementByName('SELECT-1').value ) + Number(

ff_getElementByName('SELECT-2').value ) + Number(

ff_getElementByName('SELECT-3').value ) + Number(

ff_getElementByName('SELECT-4').value ) ) / 4 ) * 1.66;

(Replace the names SELECT-* with the real names of the select lists you are using and you should be fine.)

 

 

 

Special Offer

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!