Quantcast
Channel: jQuery Library for SharePoint Web Services
Viewing all articles
Browse latest Browse all 6517

Commented Unassigned: SPRequireUnique does not work [10172]

$
0
0
This is the code I am using on NewForm.aspx:

```
<script>
$(document).ready(function() {
$().SPServices.SPRequireUnique({
columnStaticName: "DLG_x0020_Reference",
duplicateAction: 1,
ignoreCase: "false",
initMsg: "This value must be unique.",
initMsgCSSClass: "ms-vb",
errMsg: "This value is not unique.",
errMsgCSSClass: "ms-formvalidation"
});
});
</script>
```
This should be the static name of the column which is a "Single line of text".

DLG%5fx0020%5fReference

With Google Chrome I can see that an error is raised on line 2527:

```
// Get the columnDisplayName's value
var columnValue = $(this).attr("value");
if(columnValue.length === 0) { return false; }
```

And this is the error:

> Uncaught TypeError: Cannot read property 'length' of undefined

However with Internet Explorer I don't get any error, it just doesn't work. Nothing happens if I insert a value that already exists.

Got any clue? Thank you.
Comments: And you're sure that the StaticName is DLG_x0020_Reference? You can check that by going into the list settings and looking at the URL when you go to the column's settings. M.

Viewing all articles
Browse latest Browse all 6517

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>