Skip to main content
Participant
August 19, 2016
Question

capture checkbox values

  • August 19, 2016
  • 1 reply
  • 718 views

Preface: I am new to JavaScript and I know nothing about this language.

I need some JavaScript code for the following: I created a form with 8 checkboxes and a submit button.  If the boxes are checked, I want to populate the address field of an email (w/ one or multiple addresses). For example: if Child Care and Sound Tech are checked, the email address field should be populated with Childcare@test.com; Soundtech@abc.com. If nothing is checked, prompt with an error msg.  Moreover, I want the email sent in the background without the user having to click the send button.

Your assistance is appreciated

BrendaHC

This topic has been closed for replies.

1 reply

try67
Community Expert
Community Expert
August 19, 2016

What are the names of the check-boxes? Did you set the email addresses as their export values, or do you want to hard-code them into the script?

Your second request (sending the data by email silently) is not possible, not unless a script is installed on the user's local machine, and even then they have to allow it at least once.

Participant
August 19, 2016

The names of the boxes are below. In the form they are named as defaulted, i.e. Check box 35.

I planned on hard coding the email addresses, unless there is a better way. Again, I don't know Javascript.

try67
Community Expert
Community Expert
August 20, 2016

I'm not seeing anything "below"... Did you mean to insert an image?