Hi,
I have a form setup, all checkboxes and I want to count the total number of checkboxes selected, update a record that the form is based on, then I'll print that number on another page.
I could use Javascript, though my scripting skills are many years old. I do have a script in place that simply adds up the checkboxes and alerts the total on screen, just to check it at a basic level. It's a bit messy...
Do you guys have examples of updating a record after a form submit? The developer docs talk about the structure of the code, but an example would really help. The dev docs show this:
// Change view_1 to the form view you want to listen to
$(document).on('knack-form-submit.view_1', function(event, view, record) {
alert('Form submitted!'); });
I'd actually prefer to find a non-javascript way of totalling up how many checkboxes are selected in an entire form (I don't need it broken down per question). They tell you to check an object ID by right clicking on the record table checkbox area and looking to see the ID there. But if I'm submitting the form, that's not practical. The ID will only *just* have been created by the form submission. I wondered about formula fields, but they only allow you to count from related records that have a numerical value.
Any thoughts? I'm stumped.