Email the value of "checked" checkbox fields from a custom Form

This forum contains topics that were moved from Get Satisfaction
Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Email the value of "checked" checkbox fields from a custom Form

Post by Ed »

Hello,

Do you have a Javascript similar to the one below that will allow me to Email the value of both "Text" fields and "checked" checkbox fields from a custom Form?

Yurii in this forum provided a solution for "Text" fields (below) which works for "Text" fields but not for "checkbox" fields.

var text = "";
//Here you need to fill all fields you want send to email.
text += "EventTitle= " + Apperyio("EventTitle").val() + "";
text += "Company= " + Apperyio("Company").val() + "";
text += "first_Name= " + Apperyio("first_Name").val() + "";
text += "last_Name= " + Apperyio("last_Name").val() + "";
return text;

Thank you in advance!

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Email the value of "checked" checkbox fields from a custom Form

Post by Ed »

Can you please forward the above question to Yurii Orishchuk (Employee at Appery) so he can answer it? I am hoping he may have an answer. Thank you.

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Email the value of "checked" checkbox fields from a custom Form

Post by Serhii Kulibaba »

Hello Ed,

Please follow this topic: https://getsatisfaction.com/apperyio/...

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Email the value of "checked" checkbox fields from a custom Form

Post by Ed »

I don't believe this question was answered at the above link.

Do you have an example Javascript that will allow me to Email the value of both "Text" fields and "checked" checkbox fields from a Form?

The script below only works with "Text" fields:

var text = "";
//Here you need to fill all fields you want send to email.
text += "EventTitle= " + Apperyio("EventTitle").val() + "";
text += "Company= " + Apperyio("Company").val() + "";
text += "first_Name= " + Apperyio("first_Name").val() + "";
text += "last_Name= " + Apperyio("last_Name").val() + "";
return text;

Yurii Orishchuk
Posts: 0
Joined: Fri Feb 14, 2014 8:20 am

Email the value of "checked" checkbox fields from a custom Form

Post by Yurii Orishchuk »

Hi Ed,

1 For text box you can get values(stored in this text box) with code:

pre

Apperyio("EventTitle").val();

/pre

2 For checkboxed - you can get checked or not this checkbox.

pre

Apperyio("mobilecheckbox_233").find("input").prop("checked")

/pre

So text you can configure like:

pre

var text = "";
//Here you need to fill all fields you want send to email.
text += "EventTitle= " + Apperyio("EventTitle").val() + "";
text += "Company= " + Apperyio("Company").val() + "";

if(Apperyio("mobilecheckbox_233").find("input").prop("checked"))
text += "First checkbox checked";

if(Apperyio("mobilecheckbox_234").find("input").prop("checked"))
text += "Second checkbox checked";

return text;

/pre

Regards.

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Email the value of "checked" checkbox fields from a custom Form

Post by Ed »

Thank you Yurii for getting back to me. I will give it a try.

Also, I was wondering, on the Form I have a Pull-Down menu component which includes different email addresses to choose from to send the email to, which works fine.

However, I made sure to include on the Form an additional field to manually enter an email address in case the email address of the person completing the form is not appearing in the Pull-Down menu. Is there a script that I can include in the mapping for the extra email field? Thank you!

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Email the value of "checked" checkbox fields from a custom Form

Post by Serhii Kulibaba »

Do you use service mapping for that? If so - please add your value to the storage array which is used in the mapping

Ed
Posts: 0
Joined: Wed May 13, 2015 6:14 pm

Email the value of "checked" checkbox fields from a custom Form

Post by Ed »

Hello Sergiy, do you have an example? I don't quite follow. Thanks.

Serhii Kulibaba
Posts: 147
Joined: Tue Aug 27, 2013 1:47 pm

Email the value of "checked" checkbox fields from a custom Form

Post by Serhii Kulibaba »

1) Save service response into storage variable:
add on service success event JS:
preApperyio.storage.myArr.set(data);/pre
2) Add you value into that array: https://getsatisfaction.com/apperyio/...
3) Use that storage variable in the mapping

Post Reply