Skip to content

Instantly share code, notes, and snippets.

@spdustin
Created December 10, 2012 15:13
Show Gist options
  • Save spdustin/4251154 to your computer and use it in GitHub Desktop.
Save spdustin/4251154 to your computer and use it in GitHub Desktop.
Web Snippets
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xmp>
<xsl:apply-templates/>
</xmp>
</xsl:template>
<xsl:template match="@*|node()">
<xsl:copy>
<xsl:apply-templates select="@*|node()" />
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
<cars>
<car make="Ford" model="Pinto" explosiveTendencies="true"/>
<car make="Toyota" model="Prius"/>
</cars>
<tasks>
<task title="Task 1" project="Acme Inc." percentComplete="0"/>
<task title="Task 2" project="Acme Inc." percentComplete=".5"/>
<task title="Task 3" project="Doe Enterprises" percentComplete=".25"/>
<task title="Task 4" project="Doe Enterprises" percentComplete=".75"/>
</tasks>
<!DOCTYPE xsl:stylesheet [
<!ENTITY copytext "Copyright (c) 2012 SharePoint Experts, Inc.">
<!ENTITY caroutput "concat(@make,' ',@model)">
<!ENTITY upper "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
<!ENTITY lower "abcdefghijklmnopqrstuvwxyz">
<!ENTITY liClass "translate(@make,'&upper;','&lower;')">
<!ENTITY empty "not(normalize-space())">
<!ENTITY siblings "../*">
<!ENTITY rowxpath "/cars/car">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<div id="tabs">
<ul>
<xsl:apply-templates mode="links" select="&rowxpath;" />
</ul>
<xsl:apply-templates mode="content" select="&rowxpath;" />
</div>
</xsl:template>
<xsl:template match="&rowxpath;" mode="links">
<li>
<!--
<xsl:if test="@explosiveTendencies = 'true'">
</xsl:if>
-->
<xsl:attribute name="class">
<xsl:choose>
<xsl:when test="@explosiveTendencies = 'true'">explosive-yes</xsl:when>
<xsl:when test="@explosiveTendencies = 'sometimes'">explosive-maybe</xsl:when>
<xsl:otherwise>explosive-no</xsl:otherwise>
</xsl:choose>
</xsl:attribute>
<a href="#tabs-{position()}"><xsl:value-of select="&caroutput;"/></a>
</li>
</xsl:template>
<xsl:template match="&rowxpath;" mode="content">
<div id="tabs-{position()}" class="{&liClass;}">
<strong>
<xsl:value-of select="@make"/>
</strong>
<xsl:value-of select="@model"/>
</div>
</xsl:template>
</xsl:stylesheet>
<!DOCTYPE xsl:stylesheet [
<!ENTITY copytext "Copyright (c) 2012 SharePoint Experts, Inc.">
<!ENTITY caroutput "concat(@make,' ',@model)">
<!ENTITY upper "ABCDEFGHIJKLMNOPQRSTUVWXYZ">
<!ENTITY lower "abcdefghijklmnopqrstuvwxyz">
<!ENTITY liClass "translate(@make,'&upper;','&lower;')">
]>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<div id="tabs">
<ul>
<xsl:apply-templates mode="links" select="/cars/car" />
</ul>
<xsl:apply-templates mode="content" select="/cars/car" />
</div>
&copytext;
</xsl:template>
<xsl:template match="/cars/car" mode="links">
<li>
<a href="#tabs-{position()}"><xsl:value-of select="&caroutput;"/></a>
</li>
</xsl:template>
<xsl:template match="/cars/car" mode="content">
<div id="tabs-{position()}" class="{&liClass;}">
<strong>
<xsl:value-of select="@make"/>
</strong>
<xsl:value-of select="@model"/>
</div>
</xsl:template>
</xsl:stylesheet>
<xsl:template match="*|/">
<xsl:apply-templates/>
</xsl:template>
<xsl:template match="text() | @*">
<xsl:value-of select="."/>
</xsl:template>
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="html" indent="yes"/>
<xsl:key name="projectsKey" match="task" use="@project"/>
<xsl:variable name="test">I'm a test</xsl:variable>
<xsl:param name="ListID">asdfkljh-asedfkhjg-asdf9</xsl:param>
<xsl:template match="/">
<ul>
<xsl:apply-templates select="/tasks/task[count(. | key('projectsKey', @project)[1]) = 1]" mode="header"/>
</ul>
<xsl:call-template name="newslink"/>
</xsl:template>
<xsl:template match="task" mode="header">
<li>
<h1>
<xsl:call-template name="newslink">
<xsl:with-param name="projectname" select="@project"/>
</xsl:call-template>
</h1>
<ul>
<xsl:apply-templates mode="detail" select="key('projectsKey', @project)"/>
</ul>
</li>
</xsl:template>
<xsl:template match="task" mode="detail">
<li>
<xsl:value-of select="@title"/><br/>
<div style="background-color: red; height: 40px; width:{@percentComplete*200}px;">-</div>
</li>
</xsl:template>
<xsl:template name="newslink">
<xsl:param name="projectname">Not A Real Company</xsl:param>
<xsl:variable name="foo">bar</xsl:variable>
<a href="http://news.google.com/search?q={$projectname}">
<xsl:value-of select="$projectname"/>
</a>
<xsl:value-of select="$foo"/>
</xsl:template>
</xsl:stylesheet>
<?xml version="1.0"?>
<svg width="700" height="400" xmlns="http://www.w3.org/2000/svg">
<!-- Created with SVG-edit - http://svg-edit.googlecode.com/ -->
<g>
<title>Layer 1</title>
<rect id="newbar1" x="50" width="40" height="100" y="300"/>
<rect id="newbar2" x="100" width="40" height="240" y="160"/>
</g>
<style>
<![CDATA[
rect {
fill: red;
stroke: black;
stroke-width: 2px;
-moz-transition: all 500ms;
}
rect:hover {
fill: blue;
}
]]>
</style>
</svg>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- This XSL Stylesheet created by SharePoint Experts, Inc. -->
<!-- http://sharepointexperience.com -->
<xsl:output method="html" indent="yes"/>
<!-- This template is the "wrapper" or "container" for the custom view. -->
<xsl:template match="/">
<!-- This is the actual wrapper element that will be emitted -->
<div>
<!-- This will tell the data view to look for the actual content
and come back when it's done. -->
<xsl:apply-templates/>
</div>
<!-- end wrapper -->
</xsl:template>
<xsl:template match="/dsQueryResponse/Rows/Row">
<!-- This markup is used for each item in the list -->
<p id="{@ID}"><xsl:value-of select="@Title"/></p>
</xsl:template>
</xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- This XSL Stylesheet created by SharePoint Experts, Inc. -->
<!-- http://sharepointexperience.com -->
<xsl:output method="html" indent="yes"/>
<!-- This template is the "wrapper" or "container" for the custom view. -->
<xsl:template match="/"><foo>
<!-- This is the actual wrapper element that will be emitted -->
<section class="news">
<!-- This will tell the data view to look for the actual content
and come back when it's done. -->
<xsl:apply-templates/>
</section>
<!-- end wrapper -->
</xsl:template>
<xsl:template match="/dsQueryResponse/Rows/Row">
<!-- This markup is used for each item in the list -->
<article>
<xsl:if test="@Featured.value = 1">
<xsl:attribute name="class">featured</xsl:attribute>
</xsl:if>
<header>
<h1><xsl:value-of select="@Title"/></h1>
<small><xsl:value-of select="@Created"/></small>
</header>
<xsl:value-of select="@Body" disable-output-escaping="yes"/>
</article>
</xsl:template>
</xsl:stylesheet>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xlink="http://www.w3.org/1999/xlink">
<xsl:param name="chartWidth">700</xsl:param>
<xsl:param name="chartHeight">450</xsl:param>
<xsl:param name="barMax">400</xsl:param>
<xsl:param name="barWidth">40</xsl:param>
<xsl:param name="barPadding">10</xsl:param>
<xsl:template match="/">
<svg width="{$chartWidth}" height="{$chartHeight}" xmlns="http://www.w3.org/2000/svg"
xsl:exclude-result-prefixes="#default">
<g>
<title>Tasks - Percent Complete</title>
<xsl:apply-templates select="/dsQueryResponse/Rows/Row"/>
</g>
<style><![CDATA[
.barLabel {
transition: all 1s;
-moz-transition: all 1s;
-ms-transition: all 1s;
-o-transition: all 1s;
-webkit-transition: all 1s;
}
.barLabel:hover {
font-size: 24px;
fill: #000000;
}
.NotStarted {
fill: red;
}
.InProgress {
fill: yellow;
}
.Completed {
fill: green;
}
]]>
</style>
</svg>
</xsl:template>
<xsl:template match="/dsQueryResponse/Rows/Row">
<!--
barHeight = $chartHeight * % Complete
barTop = $chartHeight - barHeight
barLeft = (currentRow * (barWidth + barPadding))
-->
<xsl:variable name="barLeft" select="position() * ($barWidth + $barPadding)"/>
<xsl:variable name="barHeight" select="$barMax * @PercentComplete."/>
<xsl:variable name="barTop" select="$chartHeight - $barHeight"/>
<a xlink:href="/webdev/dustin.miller/Lists/Tasks/DispForm.aspx?ID={@ID}" title="Link to {@Title}">
<rect class="{translate(@Status,' ','')}" x="{$barLeft}" y="{$barTop}" width="{$barWidth}"
height="{$barHeight}" fill="#000000"/></a>
<text text-anchor="middle" y="{$barTop - 16}" x="{($barWidth div 2) + $barLeft}" fill="#000000">
<xsl:value-of select="@PercentComplete"/>
</text>
<text class="barLabel" text-anchor="middle"
y="{$chartHeight - ($barHeight div 2)}"
x="{($barWidth div 2) + $barLeft}" fill="#ffff00"
transform="rotate(-90, {($barWidth div 2) + $barLeft}, {$chartHeight - ($barHeight div 2)})"
>
<xsl:value-of select="@Title"/>
</text>
</xsl:template>
</xsl:stylesheet>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Demo of CSS accordion" />
<meta charset=utf-8 />
<title>Demo of CSS-only accordion</title>
<style>
.news h1 a {
text-decoration: none;
font-size: 14px;
}
.news h1 {
background-color: silver;
padding: .5em;
margin: 0;
}
.news div {
height : 0;
padding: 0;
overflow: hidden;
-webkit-transition: all 2s;
-moz-transition: all 2s;
-o-transition: all 2s;
-ms-transition: all 2s;
transition: all 2s;
}
.news div:target {
height: auto;
padding: 2em;
border-left: 1px solid silver;
border-right: 1px solid silver;
}
.news {
border-bottom: 1px solid silver;
}
</style>
</head>
<body>
<div class="news">
<h1><a href="#story1">First story</a></h1>
<div id="story1">I'm the first story</div>
<h1><a href="#story2">Second story</a></h1>
<div id="story2">I'm the second story</div>
<h1><a href="#story3">Third story</a></h1>
<div id="story3">I'm the third story</div>
</div>
</body>
</html>
<!DOCTYPE html>
<html>
<head>
<meta name="description" content="Demo of CSS accordion" />
<meta charset=utf-8 />
<title>
Tabs with CSS Only
</title>
</head>
<body>
<form>
<style>
label {
border: 1px solid grey;
padding: 4px 2px 2px;
background-color: silver;
}
div {
background-color: yellow;
height: 0;
overflow: hidden;
}
input[type=radio] {
position: absolute;
opacity: 0;
}
input[type=radio]:checked + div {
height: auto;
}
</style>
<label for="toggle1">
Tab 1
</label>
<label for="toggle2">
Tab 2
</label>
<label for="toggle3">
Tab 3
</label>
<hr>
<input type="radio" name="toggler" id="toggle1" checked>
<div>
Tab content 1
</div>
<input type="radio" name="toggler" id="toggle2">
<div>
Tab content 2
</div>
<input type="radio" name="toggler" id="toggle3">
<div>
Tab content 3
</div>
</form>
</body>
</html>
$('section.news header').on(
'click',
function() {
$('section.news div').slideUp();
$(this).toggleClass('collapsed').next().slideToggle();
$('embed');
$('body').append('<embed src="http://soundjax.com/reddo/10211^RVBCLICK.mp3" autostart="true" hidden="true" loop="false"></embed>');
}
).next().hide();

Objects

Objects in the real world are similar to objects in programming.

Properties

Things that you can observe about the object. You "get" and "set" properties.

  • visualProperties
    • color (visualProperties.color)
    • cleanliness
    • numWheels
    • numDoors
    • make
    • model
    • bodyStyle
    • year
    • cosmeticCondition
  • activeProperties
    • velocity (speed and direction)
    • fuelLevel
    • tirePressure (TPMS)
    • accidentState
  • otherProperties
    • newCarSmellIntensity
    • maintenanceHistory
    • resaleValue

Methods

Things that you do to the object, or ask the object to do for you. You "call" methods, and optionally pass parameters. They look like this: object.methodcall(param)

  • changeVelocity(deltaDirection, deltaSpeed)
  • loadTrunk
  • audioSystem
    • changeMode
    • changeVolume
    • changeStation
    • changeTrack
    • changeDriversTasteInMusic
    • changePassengersWhoWontKeepTheirHandsOffTheButtons
  • startWithKey
  • startWithoutKey
  • alarmArm
  • alarmDisarm
  • passengerEject
  • activateAirbag
  • toggleDoorLocks
  • windowRoll
  • navigation.(etc., etc.)
  • refuel
  • changeOil
  • callOnstar

Events

Things the object alerts you do, whether you care to listen or not. You "subscribe" or "bind" to events. The object "raises" the event.

  • oilPressureAlert
  • proximityAlert
  • restraintChime
  • TPMSAlert
  • airbagDeployed
var speAutoComplete = function(fieldName, listName, fieldToMap) {
var theField = $('input[title="' + fieldName + '"]');
console.log(theField);
var restEndpoint = _spPageContextInfo.webServerRelativeUrl + '/_vti_bin/ListData.svc/' + listName;
console.log(restEndpoint);
theField.autocomplete({
source: function(request, response) {
var fullUrl = restEndpoint + "?$filter=startswith(" + fieldToMap + ",'" + request.term + "')";
$.getJSON(fullUrl, function(data) {
response($.map(data.d.results, function(suggestion) {
return suggestion[fieldToMap];
}));
});
}
});
};
speAutoComplete('Favorite Tweet','SavedTweets', 'Text');
<xsl:stylesheet xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" version="1.0" exclude-result-prefixes="xsl msxsl ddwrt" xmlns:ddwrt="http://schemas.microsoft.com/WebParts/v2/DataView/runtime" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:msxsl="urn:schemas-microsoft-com:xslt" xmlns:SharePoint="Microsoft.SharePoint.WebControls" xmlns:ddwrt2="urn:frontpage:internal">
<xsl:output method="html" indent="no"/>
<xsl:decimal-format NaN=""/>
<xsl:param name="dvt_apos">'</xsl:param>
<xsl:param name="ManualRefresh"></xsl:param>
<xsl:variable name="dvt_1_automode">0</xsl:variable>
<xsl:template match="/" xmlns:x="http://www.w3.org/2001/XMLSchema" xmlns:dsp="http://schemas.microsoft.com/sharepoint/dsp" xmlns:asp="http://schemas.microsoft.com/ASPNET/20" xmlns:__designer="http://schemas.microsoft.com/WebParts/v2/DataView/designer" xmlns:SharePoint="Microsoft.SharePoint.WebControls">
<xsl:choose>
<xsl:when test="($ManualRefresh = 'True')">
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td valign="top">
<xsl:call-template name="dvt_1"/>
</td>
<td width="1%" class="ms-vb" valign="top">
<img src="/_layouts/images/staticrefresh.gif" id="ManualRefresh" border="0" onclick="javascript: {ddwrt:GenFireServerEvent('__cancel')}" alt="Click here to refresh the dataview."/>
</td>
</tr>
</table>
</xsl:when>
<xsl:otherwise>
<xsl:call-template name="dvt_1"/>
</xsl:otherwise>
</xsl:choose>
<script type="text/javascript">
<![CDATA[
$("label").each(
function() {
$(this).attr('for',$(this).next().find("input").attr("id"));
}
);
$( "#tabs" ).tabs();
$("span[role=alert]").closest(".ui-tabs-panel").each(function() {
$tmpID = this.id;
$(".ui-tabs-nav > li > a").filter(function() {
return(this.hash == '#' + $tmpID);
}).each(function() {
$tmpHTML = $(this).html();
$tmpHTML += ' <span style="color: red; font-weight: bold;">*</span>';
$(this).html($tmpHTML);
});
});
$("span[role=alert]")
.closest("#tabs")
.before('<div class="ui-state-error ui-corner-all"><p style="padding: 0 5px;">There was a problem saving your record. Please check the form for errors by selecting each tab with a red asterisk (*)</p></div>');
$('input[id$=DateTimeFieldDate]').datepicker({
changeMonth: true,
changeYear: true
});
$('.ms-dtinput a').remove();
]]>
</script>
</xsl:template>
<xsl:template name="dvt_1">
<xsl:variable name="dvt_StyleName">ListForm</xsl:variable>
<xsl:variable name="Rows" select="/dsQueryResponse/Rows/Row"/>
<div>
<span id="part1">
<table border="0" width="100%">
<xsl:call-template name="dvt_1.body">
<xsl:with-param name="Rows" select="$Rows"/>
</xsl:call-template>
</table>
</span>
<SharePoint:AttachmentUpload runat="server" ControlMode="New"/>
<SharePoint:ItemHiddenVersion runat="server" ControlMode="New"/>
</div>
</xsl:template>
<xsl:template name="dvt_1.body">
<xsl:param name="Rows"/>
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<table>
<tr>
<td width="99%" class="ms-toolbar" nowrap="nowrap"><IMG SRC="/_layouts/images/blank.gif" width="1" height="18"/></td>
<td class="ms-toolbar" nowrap="nowrap">
<SharePoint:SaveButton runat="server" ControlMode="New" id="savebutton1"/>
</td>
<td class="ms-separator"> </td>
<td class="ms-toolbar" nowrap="nowrap" align="right">
<SharePoint:GoBackButton runat="server" ControlMode="New" id="gobackbutton1"/>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<SharePoint:FormToolBar runat="server" ControlMode="New"/>
</td>
</tr>
<xsl:call-template name="dvt_1.rowedit"/>
<tr>
<td class="ms-toolbar" nowrap="nowrap">
<table>
<tr>
<td width="99%" class="ms-toolbar" nowrap="nowrap"><IMG SRC="/_layouts/images/blank.gif" width="1" height="18"/></td>
<td class="ms-toolbar" nowrap="nowrap">
<SharePoint:SaveButton runat="server" ControlMode="New" id="savebutton2"/>
</td>
<td class="ms-separator"> </td>
<td class="ms-toolbar" nowrap="nowrap" align="right">
<SharePoint:GoBackButton runat="server" ControlMode="New" id="gobackbutton2"/>
</td>
</tr>
</table>
</td>
</tr>
</xsl:template>
<xsl:template name="dvt_1.rowedit">
<xsl:param name="Pos" select="position()"/>
<tr>
<td>
<style>
label {
display: block;
font-weight: bold;
font-size: 1.1em;
margin-bottom: .25em;
}
#tabs input {
margin-bottom: 1.5em;
}
#tabs input.ms-input{
font-size: 8pt;
}
.ms-formvalidation span{
margin-top: -1em;
display:block;
}
</style>
<div id="tabs">
<ul>
<li>
<a href="#tabs-1">Basic Info</a>
</li>
<li>
<a href="#tabs-2">Contact Info</a>
</li>
<li>
<a href="#tabs-3">Other Info</a>
</li>
</ul>
<div id="tabs-1">
<label for="">Last Name <span title="This is a required field." class="ms-formvalidation"> *</span></label>
<SharePoint:FieldDescription runat="server" id="ff1description{$Pos}" FieldName="Title" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="New" FieldName="Title" __designer:bind="{ddwrt:DataBind('i',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Title')}"/>
<label for="">First Name</label>
<SharePoint:FieldDescription runat="server" id="ff2description{$Pos}" FieldName="FirstName" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff2{$Pos}" ControlMode="New" FieldName="FirstName" __designer:bind="{ddwrt:DataBind('i',concat('ff2',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@FirstName')}"/>
<label for="">Full Name</label>
<SharePoint:FieldDescription runat="server" id="ff3description{$Pos}" FieldName="FullName" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff3{$Pos}" ControlMode="New" FieldName="FullName" __designer:bind="{ddwrt:DataBind('i',concat('ff3',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@FullName')}"/>
<label for="">Email Address</label>
<SharePoint:FieldDescription runat="server" id="ff4description{$Pos}" FieldName="Email" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff4{$Pos}" ControlMode="New" FieldName="Email" __designer:bind="{ddwrt:DataBind('i',concat('ff4',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Email')}"/>
<label for="">Company</label>
<SharePoint:FieldDescription runat="server" id="ff5description{$Pos}" FieldName="Company" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff5{$Pos}" ControlMode="New" FieldName="Company" __designer:bind="{ddwrt:DataBind('i',concat('ff5',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Company')}"/>
<label for="">Job Title</label>
<SharePoint:FieldDescription runat="server" id="ff6description{$Pos}" FieldName="JobTitle" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff6{$Pos}" ControlMode="New" FieldName="JobTitle" __designer:bind="{ddwrt:DataBind('i',concat('ff6',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@JobTitle')}"/>
</div>
<div id="tabs-2">
<label for="">Work Phone</label>
<SharePoint:FieldDescription runat="server" id="ff7description{$Pos}" FieldName="WorkPhone" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff7{$Pos}" ControlMode="New" FieldName="WorkPhone" __designer:bind="{ddwrt:DataBind('i',concat('ff7',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@WorkPhone')}"/>
<label for="">Home Phone</label>
<SharePoint:FieldDescription runat="server" id="ff8description{$Pos}" FieldName="HomePhone" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff8{$Pos}" ControlMode="New" FieldName="HomePhone" __designer:bind="{ddwrt:DataBind('i',concat('ff8',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@HomePhone')}"/>
<label for="">Cell Phone</label>
<SharePoint:FieldDescription runat="server" id="ff9description{$Pos}" FieldName="CellPhone" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff9{$Pos}" ControlMode="New" FieldName="CellPhone" __designer:bind="{ddwrt:DataBind('i',concat('ff9',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@CellPhone')}"/>
<label for="">Work Fax</label>
<SharePoint:FieldDescription runat="server" id="ff10description{$Pos}" FieldName="WorkFax" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff10{$Pos}" ControlMode="New" FieldName="WorkFax" __designer:bind="{ddwrt:DataBind('i',concat('ff10',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@WorkFax')}"/>
<label for="">Address</label>
<SharePoint:FieldDescription runat="server" id="ff11description{$Pos}" FieldName="WorkAddress" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff11{$Pos}" ControlMode="New" FieldName="WorkAddress" __designer:bind="{ddwrt:DataBind('i',concat('ff11',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@WorkAddress')}"/>
<label for="">City</label>
<SharePoint:FieldDescription runat="server" id="ff12description{$Pos}" FieldName="WorkCity" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff12{$Pos}" ControlMode="New" FieldName="WorkCity" __designer:bind="{ddwrt:DataBind('i',concat('ff12',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@WorkCity')}"/>
<label for="">State</label>
<SharePoint:FieldDescription runat="server" id="ff13description{$Pos}" FieldName="WorkState" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff13{$Pos}" ControlMode="New" FieldName="WorkState" __designer:bind="{ddwrt:DataBind('i',concat('ff13',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@WorkState')}"/>
<label for="">Zip / Postal Code</label>
<SharePoint:FieldDescription runat="server" id="ff14description{$Pos}" FieldName="WorkZip" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff14{$Pos}" ControlMode="New" FieldName="WorkZip" __designer:bind="{ddwrt:DataBind('i',concat('ff14',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@WorkZip')}"/>
<label for="">Country<span title="This is a required field." class="ms-formvalidation"> *</span></label>
<SharePoint:FieldDescription runat="server" id="ff15description{$Pos}" FieldName="WorkCountry" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff15{$Pos}" ControlMode="New" FieldName="WorkCountry" __designer:bind="{ddwrt:DataBind('i',concat('ff15',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@WorkCountry')}"/>
</div>
<div id="tabs-3">
<label for="">Home Page (URL)</label>
<SharePoint:FieldDescription runat="server" id="ff16description{$Pos}" FieldName="WebPage" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff16{$Pos}" ControlMode="New" FieldName="WebPage" __designer:bind="{ddwrt:DataBind('i',concat('ff16',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@WebPage')}"/>
<label for="">Additional Notes</label>
<SharePoint:FieldDescription runat="server" id="ff17description{$Pos}" FieldName="Comments" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff17{$Pos}" ControlMode="New" FieldName="Comments" __designer:bind="{ddwrt:DataBind('i',concat('ff17',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Comments')}"/>
<label for="">Birthday</label>
<SharePoint:FieldDescription runat="server" id="ff18description{$Pos}" FieldName="Birthday" ControlMode="New"/>
<SharePoint:FormField runat="server" id="ff18{$Pos}" ControlMode="New" FieldName="Birthday" __designer:bind="{ddwrt:DataBind('i',concat('ff18',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Birthday')}"/>
</div>
</div>
<table border="0">
<tr id="idAttachmentsRow">
<td nowrap="true" valign="top" class="ms-formlabel" width="20%">
<SharePoint:FieldLabel ControlMode="New" FieldName="Attachments"
runat="server"/>
</td>
<td valign="top" class="ms-formbody" width="80%">
<SharePoint:FormField runat="server" id="AttachmentsField"
ControlMode="New" FieldName="Attachments"
__designer:bind="{ddwrt:DataBind('i','AttachmentsField','Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Attachments')}"/>
<script>
var elm = document.getElementById(&quot;idAttachmentsTable&quot;);
if (elm == null || elm.rows.length == 0)
document.getElementById(&quot;idAttachmentsRow&quot;).style.display=&apos;none&apos;;
</script>
</td>
</tr>
</table>
</td>
</tr>
</xsl:template>
</xsl:stylesheet>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment