Need a way to repeat a group of fields without creating additional records

Thanks Rob! That does add up the repeat group point values. Awesome! Now I'm stuck with getting a grand total which includes the other items.

Here is what I'm currently working with:

Code:
$npoints = array_sum($_POST['join'][1]['fab_dailysheet_3_repeat___nutrition_points_raw']);
$sum=$npoints+'{fab_dailysheet___physical_points}'+'{fab_dailysheet___sleep_points}'+'fab_dailysheet___extra_points}';
return $sum;

It isn't totaling the last value, 'fab_dailysheet___extra_points'.

Where am a going wrong? I've tried numerous iterations of the above, but can't quite get it to total everything. Also, when do I include "_raw" in the placeholder?

*** Nevermind: I just noted the missing curly bracket for the last placeholder! It's working! Thanks so much! ***

Railer
 
Hi Hugh,

Yes, at least with this issue. As usual, I learned a bit more during the process. Originally I setup the last value in the sum as a repeat group, but changed it to a regular field. But if I did have two repeat groups, I assume I would define both repeat group values as I did with $npoints, and then follow with the sum. Not going to try it, but if I have an opportunity, I will do it that way. Now on to UI testing and tweaking. Thanks for following up!

Railer
 
Back
Top