PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Adding Fields Together

  1. CaryB
    Member

    I need my members to fill out monthly timesheets. Currently our form takes each entry and adds them all together while populating a Total field. Is it possible to do this with Gravity? I currently have them defined as number fields.

    Current Page: http://www.duvalares.org/time-entry.php
    Test Page: http://duvalares.org/wp/time-entry/

    Posted 13 years ago on Saturday March 19, 2011 | Permalink
  2. Yes, it is possible but it requires you to write custom code to do this. You would have to write custom jQuery to populate the field based on the value of the other fields. It would have to be done as a customization as it's not a built in feature.

    Posted 13 years ago on Monday March 21, 2011 | Permalink
  3. CaryB
    Member

    Ok, I've seen references to jQuery before. Another thing I want to do is always capitalize the one particular field. What I can't figure out, though, is where do I put this code? I don't recall seeing any code option in the Advanced field area.

    Posted 13 years ago on Monday March 21, 2011 | Permalink
  4. You would place the custom jQuery in your theme. Ideally for something like this you'd create a theme template file specifically for the page displaying your form, and then select that template for that page. Your custom jQuery would go in that theme template file.

    Posted 13 years ago on Monday March 21, 2011 | Permalink
  5. CaryB
    Member

    Gotcha.

    Posted 13 years ago on Monday March 21, 2011 | Permalink