How to send only selected checkboxes to email in JS form

There is a site on Joomla, there is a form component FormCalc. A form with a calculator, in general, is necessary after the user has selected what is needed, ticked, and when the send button was pressed, a letter arrived with exactly these checkboxes that he selected.

Form in HTML and JS. Sql is not involved.

Thank you in advance!

Answer 1

Set the name attribute for checkboxes of the array[] type (name=”array[]”) and then on the page where the form is sent, you can catch this array in $_REQUEST, which will contain the values ​​of all checked checkboxes

Leave a reply

Please enter your comment!
Please enter your name here