Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

Text field values changing to "true" when I click submit by e-mail button

Avatar

Level 2

I have some logic in my e-mail submit button to determine who needs to receive the form based on information in the form.  Based on my sample code, when I click the submit by e-mail button and TextFiel4.rawValue is D781008CX03, it will actually change the value in TextField4 to "true" when submitting the form.  What can i do to fix this issue?

if

(TextField4.rawValue = "D781008CX03" && CheckBox10.rawValue == true){

var myDoc = event.target;

myDoc.mailDoc(

false,

email_address@yahoo.com

, "", "",

"Request to Add "

+FuelRating.rawValue ,

"You have a new industrial request to add "

+FuelRating.rawValue

);}

1 Accepted Solution

Avatar

Correct answer by
Level 10

Hi,

You are missing a second equal sign in your test for TextField4:

if (TextField4.rawValue == "D781008CX03" && CheckBox10.rawValue == true) {

     // script

}

Hope that helps,

Niall

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Hi,

You are missing a second equal sign in your test for TextField4:

if (TextField4.rawValue == "D781008CX03" && CheckBox10.rawValue == true) {

     // script

}

Hope that helps,

Niall

Avatar

Level 2

Ahhh!!

Amature mistake  .  Thank you for the help and the quick response!!