Skip to content

Instantly share code, notes, and snippets.

@kylekeesling
Created April 20, 2012 16:05
Show Gist options
  • Save kylekeesling/2429929 to your computer and use it in GitHub Desktop.
Save kylekeesling/2429929 to your computer and use it in GitHub Desktop.
Using Portuguese in SSJS
<script runat="server" language="javascript">
Platform.Load("Core","1");
var requestsDE = DataExtension.Init("bz-solcon-requests");
var triggeredSend = TriggeredSend.Init("bsrf");
requestsDE.Rows.Add({
repName: Request.GetFormField('repName'),
companyName: Request.GetFormField('companyName'),
companyUrl: Request.GetFormField('companyUrl'),
contactName: Request.GetFormField('contactName'),
contactTitle: Request.GetFormField('contactTitle'),
underContract: Request.GetFormField('underContract'),
renewalDate: Request.GetFormField('renewalDate'),
currentVendor: Request.GetFormField('currentVendor'),
currentSpend: Request.GetFormField('currentSpend'),
otherCompetitors: Request.GetFormField('otherCompetitors'),
sendVolume: Request.GetFormField('sendVolume'),
sendMetrics: Request.GetFormField('sendMetrics'),
currentSystems: Request.GetFormField('currentSystems'),
likesDislikes: Request.GetFormField('likesDislikes'),
successMetrics: Request.GetFormField('successMetrics'),
stakeholders: Request.GetFormField('stakeholders'),
timeline: Request.GetFormField('timeline'),
nextSteps: Request.GetFormField('nextSteps'),
solutionPresentation: Request.GetFormField('solutionPresentation'),
demo: Request.GetFormField('demo'),
discovery: Request.GetFormField('discovery'),
proofOfConcept: Request.GetFormField('proofOfConcept'),
scoping: Request.GetFormField('scoping'),
audienceBuilder: Request.GetFormField('audienceBuilder'),
services: Request.GetFormField('services'),
email: Request.GetFormField('email'),
SMS: Request.GetFormField('SMS'),
SocialEngage: Request.GetFormField('SocialEngage'),
SocialPages: Request.GetFormField('SocialPages')
});
var dataXML;
dataXML += Request.GetFormField('repName') + "|";
dataXML += Request.GetFormField('companyName') + "|";
dataXML += Request.GetFormField('companyUrl') + "|";
dataXML += Request.GetFormField('contactName') + "|";
dataXML += Request.GetFormField('contactTitle') + "|";
dataXML += Request.GetFormField('underContract') + "|";
dataXML += Request.GetFormField('renewalDate') + "|";
dataXML += Request.GetFormField('currentVendor') + "|";
dataXML += Request.GetFormField('currentSpend') + "|";
dataXML += Request.GetFormField('otherCompetitors') + "|";
dataXML += Request.GetFormField('sendVolume') + "|";
dataXML += Request.GetFormField('sendMetrics') + "|";
dataXML += Request.GetFormField('currentSystems') + "|";
dataXML += Request.GetFormField('likesDislikes') + "|";
dataXML += Request.GetFormField('successMetrics') + "|";
dataXML += Request.GetFormField('stakeholders') + "|";
dataXML += Request.GetFormField('timeline') + "|";
dataXML += Request.GetFormField('nextSteps')+ "|";
dataXML += Request.GetFormField('solutionPresentation') + "|";
dataXML += Request.GetFormField('demo') + "|";
dataXML += Request.GetFormField('discovery') + "|";
dataXML += Request.GetFormField('proofOfConcept') + "|";
dataXML += Request.GetFormField('scoping') + "|";
dataXML += Request.GetFormField('audienceBuilder') + "|";
dataXML += Request.GetFormField('services') + "|";
dataXML += Request.GetFormField('email') + "|";
dataXML += Request.GetFormField('SMS') + "|";
dataXML += Request.GetFormField('SocialEngage') + "|";
dataXML += Request.GetFormField('SocialPages') + "|";
var status = triggeredSend.Send("[email protected]", {"HTML_XML":dataXML});
if (status == "OK") {
var status2 = triggeredSend.Send("[email protected]", {"HTML_XML":dataXML});
} else {
var status2 = "ERROR"
}
</script>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-type" content="text/html; charset=utf-8">
<title>Thanks for Submitting Your Request!</title>
<!-- HTML5 shim, for IE6-8 support of HTML elements -->
<!--[if lt IE 9]>
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/1.4.0/bootstrap.min.css">
</head>
<body>
<div class="container" style="margin-top: 25px;">
<div class="row">
<div class="span12 offset2 page-header">
<h1>SolCon Request Form</h1>
</div>
</div>
<div class="row">
<div class="span12 offset2">
<script runat="server" language="javascript">
if (status2 == "OK") {
Write("<h3>Thank You!</h3>");
Write("<p>We'll be in touch with your very soon.</p>");
} else {
Write("<h3>Uh oh....</h3>");
Write("<p>It looks like your data was collected but we were unable to send an email notification. Please contact <a href='mailto:[email protected]?subject=SolCon Request Form'>Kyle Keesling</a> to make sure we give your request the attention it deserves.</p>");
}
</script>
</div>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment