Creating a quote with hidden Values (hidden from Inspect Element)

Possible use of dynamic population here, but am open to suggestion.
I am trying to build a quote form, where multiple items will always be selected.

Each item will have its own pricing.

The user is not to see the pricing of any of the products until after they have submitted the form (eg. receive a PDF with the quote attached), and as such the Product field is probably not for me.
The user is not to be able to “Inspect Element” to see the values attributed to the items in the form, otherwise “Displaying Values” against a standard checkbox field, and then using calculations, would be great.

Is there some sort of “standard” way of achieving this, maybe via another add-on?

Otherwise, three thoughts I had:
One was to manipulate the value attribute used when “Showing Values” against the fields via Javascript, but this would be long winded, and difficult to maintain.

Second was to use a dummy set of hidden fields, that could be dynamically populated.
Eg. I have Checkbox A (no value), and Hidden Checkbox A (with value).
If Checkbox A is selected, Hidden Checkbox A is also selected.
De-select Checkbox A, Hidden Checkbox A is also de-selected.

The “hidden” checkboxes (and other field types) are then added up using a hidden calculated field, which I am hoping I can still display on a PDF!

I feel this method would be easier to maintain, if it’s doable.

Third way would be to use a hidden calculated field, and put the pricing all within there.
Eg. Checkbox A, Checkbox B and Checkbox C all have a value of 1.
A hidden calculated field looks to sum (Checkbox A x 100) + (Checkbox B x 150) + (Checkbox C x 200) but am hoping for a smarter solution!

Thanks for reading this far :slight_smile:

I solved a similar problem years ago with Server-side Calculations. It’s basically the same concept you had with your hidden calculated field idea; however, it accounts for the fact that the formula is still exposed so a crafty user could find it using DevTools. Instead of ever entering the formula in the form editor, you register it with a script and then intercept the calculation of that targeted field, fire off and AJAX request to process the formula, and then return the result. It’s definitely a bit slower than just processing everything client side but it keeps your numbers completely private.

I tried to find the snippet in case you were curious but, alas, it appears to be lost to time. :sob: