Changes

Jump to: navigation, search

Custom Field Type: Special - Advanced Data Table

789 bytes added, 19:16, 24 March 2017
m
Special - Browser Script validation
<pre>@xml.customfieldname.sectionnodename.rownodename.columnnodename@</pre>
The following function allows you to check for an already selected value from an existing row when using dynamic rows:
<pre>
// REPLACE '7172_dsItem_Population' AND '7172_dsItem_Population_' WITH SPECIFIC XML FIELD ID
 
var saveFunc=saveXML;
saveXML=function() {
checkdupeval();
}
function checkdupeval() {
var result = 0;
var numOfRows = document.getElementsByName('7172_dsItem_Population'); //section node
var ctr=1;
for (ctr=1;ctr<numOfRows.length;ctr++)
{
var field1='7172_dsItem_Population_'+ctr;
var lastfield='7172_dsItem_Population_'+numOfRows.length;
var a = document.getElementById(field1).value;
var b = document.getElementById(lastfield).value;
if( a == b)
{
alert ("Please list each population no more than once.");
result = 1;
}
}
if(result==0)
saveFunc();
}
</pre>
== Displaying XML Data==
Smartstaff
281
edits

Navigation menu