Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

checkbox to populate email address script

Avatar

13-04-2015

I have a form and when bind the value to "on" and populate with an email address this is fine. However when I don't check the box my outlook does not recognise " " or null. I am basic with scripting can anyone please help?

Dunc

Accepted Solutions (0)

Answers (1)

Answers (1)

Avatar

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile

Avatar
Validate 1
Level 4
jasotastic81
Level 4

Likes

35 likes

Total Posts

329 posts

Correct Reply

43 solutions
Top badges earned
Validate 1
Boost 5
Boost 3
Boost 25
Boost 10
View profile
jasotastic81
Level 4

14-04-2015

Not sure how you're sending the email request, but here's a script for a button that takes its subject from a text field and takes its To: address from a checkbox with an address for the on value and empty string for off value.


var subject = TextField1.rawValue;


var email = (Checkbox1.rawValue == null) ? "" : CheckBox1.rawValue;



event.target.mailDoc({


  bUI: false,


  cTo: email,


  cSubmitAs: "pdf",


  cSubject: subject


});


750480_pastedImage_0.png

750481_pastedImage_1.png

750491_pastedImage_2.png