Prototype Samples

Introducing… Dynamo – A Scriptable DotNetNuke module


With version 1.5 we can now mix HTML and Code in the same script. For example...


--------------------------------------------------------
<fieldset><legend>Provide Feedback</legend>
Your Email:<br /><input type='text' value='@{=get("fromemail")}@' name='fromemail'><br />
Subject:<br /><input type='text' value='@{=get("subject")}@' name='subject'><br />
Body:<br /><textarea name='body' rows='10' cols='50'>@{=get("body")}@</textarea><br />
<input type='submit' value='Send Feedback'><br />
</fieldset>


@{
if(Page.IsPostBack) {
var fromemail = get("fromemail");
var subject = get("subject");
var body= get("body");
if(fromemail!="" && subject!="" && body!="") {
var val = DotNetNuke.Services.Mail.Mail.SendMail(fromemail, "admin@localhost", "", subject, body, "", "", "", "", "", "");
if(val=="") val = "Your message was sent.";
echo(val);
}

}
return "";

}@
--------------------------------------------------------

Last edited Jul 26, 2010 at 6:11 PM by RobChartier, version 5

Comments

No comments yet.