TOPIC:

Calculating Radio Values 1 month 2 weeks ago #248106

  • Topic Author
  • thcinc
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Thanks for your help... I am still a bit confused.. When I try to add the line that I think I need it isn't working out. Here is what I have so far with questions & section sums...
function ff_LCAEIPretest_init()
{

 jQuery('[name="ff_nm_SLFAW1[]"], [name="ff_nm_SLFAW2[]"], [name="ff_nm_SLFAW3[]"], [name="ff_nm_SLFAW4[]"], [name="ff_nm_SLFAW5[]"], [name="ff_nm_SLFAW6[]"], [name="ff_nm_SLFAW7[]"], [name="ff_nm_SLFAW8[]"]').click(function(){
  var total = 0;
  jQuery('[name="ff_nm_SLFAW1[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
  jQuery('[name="ff_nm_SLFAW2[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
    jQuery('[name="ff_nm_SLFAW3[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFAW4[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFAW5[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFAW6[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFAW7[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFAW8[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
 
  ff_getElementByName('SLFAWsum').value = total;
 });

 jQuery('[name="ff_nm_SLFMA1[]"], [name="ff_nm_SLFMA2[]"], [name="ff_nm_SLFMA3[]"], [name="ff_nm_SLFMA4[]"], [name="ff_nm_SLFMA5[]"], [name="ff_nm_SLFMA6[]"], [name="ff_nm_SLFMA7[]"], [name="ff_nm_SLFMA8[]"], [name="ff_nm_SLFMA9[]"], [name="ff_nm_SLFMA10[]"], [name="ff_nm_SLFMA11[]"]').click(function(){
  var total = 0;
  jQuery('[name="ff_nm_SLFMA1[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
  jQuery('[name="ff_nm_SLFMA2[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
    jQuery('[name="ff_nm_SLFMA3[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFMA4[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFMA5[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFMA6[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFMA7[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFMA8[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
    jQuery('[name="ff_nm_SLFMA9[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });   jQuery('[name="ff_nm_SLFMA10[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });   jQuery('[name="ff_nm_SLFMA11[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });

  ff_getElementByName('SLFMAsum').value = total;
 });
 jQuery('[name="ff_nm_SOCAW1[]"], [name="ff_nm_SOCAW2[]"], [name="ff_nm_SOCAW3[]"], [name="ff_nm_SOCAW4[]"], [name="ff_nm_SOCAW5[]"], [name="ff_nm_SOCAW6[]"], [name="ff_nm_SOCAW7[]"], [name="ff_nm_SOCAW8[]"], [name="ff_nm_SOCAW9[]"], [name="ff_nm_SOCAW10[]"]').click(function(){
  var total = 0;

  jQuery('[name="ff_nm_SOCAW1[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
  jQuery('[name="ff_nm_SOCAW2[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
    jQuery('[name="ff_nm_SOCAW3[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SOCAW4[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SOCAW5[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SOCAW6[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SOCAW7[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SOCAW8[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
    jQuery('[name="ff_nm_SOCAW9[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
    jQuery('[name="ff_nm_SOCAW10[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
 
  ff_getElementByName('SOCAWsum').value = total;
 });
 jQuery('[name="ff_nm_RELMA1[]"], [name="ff_nm_RELMA2[]"], [name="ff_nm_RELMA3[]"], [name="ff_nm_RELMA4[]"], [name="ff_nm_RELMA5[]"], [name="ff_nm_RELMA6[]"], [name="ff_nm_RELMA7[]"], [name="ff_nm_RELMA8[]"], [name="ff_nm_RELMA9[]"], [name="ff_nm_RELMA10[]"], [name="ff_nm_RELMA11[]"]').click(function(){
  var total = 0;

  jQuery('[name="ff_nm_RELMA1[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
  jQuery('[name="ff_nm_RELMA2[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
    jQuery('[name="ff_nm_RELMA3[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_RELMA4[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_RELMA5[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_RELMA6[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_SLFMA7[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_RELMA8[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_RELMA9[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_RELMA10[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_RELMA11[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
 
  ff_getElementByName('RELMAsum').value = total;
 });
 jQuery('[name="ff_nm_LEAOR1[]"], [name="ff_nm_LEAOR2[]"], [name="ff_nm_LEAOR3[]"], [name="ff_nm_LEAOR4[]"], [name="ff_nm_LEAOR5[]"], [name="ff_nm_LEAOR6[]"], [name="ff_nm_LEAOR7[]"], [name="ff_nm_LEAOR8[]"], [name="ff_nm_LEAOR9[]"], [name="ff_nm_LEAOR10[]"]').click(function(){
  var total = 0;

  jQuery('[name="ff_nm_LEAOR1[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
  jQuery('[name="ff_nm_LEAOR2[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
    jQuery('[name="ff_nm_LEAOR3[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_LEAOR4[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_LEAOR5[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_LEAOR6[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_LEAOR7[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
   jQuery('[name="ff_nm_LEAOR8[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
    jQuery('[name="ff_nm_LEAOR9[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });
    jQuery('[name="ff_nm_LEAOR10[]"]:checked').each(function(){
    total += Number(jQuery(this).val());
   
  });

  ff_getElementByName('LEAORsum').value = total;
 });
} // ff_check_init

The totals in each section are working but when I try to add a line for totaling all sum fields, I blow it up.
Thanks a bunch for your help.

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

Calculating Radio Values 1 month 2 weeks ago #248109

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

can you please send me your login information and backend link, so I can do it for you?
Use this:
[confidential]
//your information here
[/confidential]

Regards,
Tihana

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

Last edit: Post by tihana.krivic.

Calculating Radio Values 1 month 1 week ago #248152

  • Topic Author
  • thcinc
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Here is the creds...
This message contains confidential information

Thanks for your help.

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

Calculating Radio Values 1 month 1 week ago #248153

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

I have a question.
You have a sum for every section(page). This works well.
You want to have a sum of all sum field in the end of form? Am I right?

Regards,
Tihana

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

Calculating Radio Values 1 month 1 week ago #248163

  • Topic Author
  • thcinc
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Yes, that is correct. They need a sum for each section as well as sum for all total fields at the end.
I will end up making the sum fields hidden inputs before presenting to them.
Thanks again for your help.

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

Calculating Radio Values 1 month 1 week ago #248181

  • Topic Author
  • thcinc
  • Offline
  • Fresh Breezer
  • Fresh Breezer
  • Posts: 11
  • Thanks: 0
Hi,
FYI, I just moved everything into the root of the domain so now the location link no longer requires /joomla/.
I changed the sum fields to hidden inputs and added a final element for the total sum.
I noticed where you added into the script 'total#' for each section... But I didn't want to make changes if you were still going in and out of there.
Am I close with something like this?...
  });
  ff_getElementByName('ALLSECTIONSsum').value = total1+total2+total3+total4;
 });

Thanks a bunch for your help.

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

Time to create page: 0.044 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!