Closed iOnline247 closed 8 years ago
@iOnline247 : We're now working on SPServices 2.0. If you'd like to resubmit this pull request against the current code base, I'll look at it again. Sorry I never got to it before.
The testbed is still online if you want to pull it in. http://jsfiddle.net/iOnline247/zfdLq4cw/
It's a drop in replacement of the function that caused a problem for me: https://github.com/sympmarc/SPServices/blob/master/dist/jquery.SPServices.js#L4460-L4474
So the goal here is to allow for searching on the DisplayName or StaticName?
Oh, ok. I see what you're doing. I'm finding a match if the text 'FieldName="ColumnName"' is the column's elements anywhere. Sort of an edge case, but I get it.
The danger in matching on both the DisplayName or StaticName is that sometimes columns get renamed enough to cause issues. For instance, We could have a column with the DisplayName "Location" and a column with the StaticName "Location", right?
It could be looked at as a feature, especially for people that are just starting out. If that's too big of a drawback, that capability could be easily removed. I had both for others and just documented the drawbacks of DisplayName usage.
This find the comment nodes and only checks the comment nodes, not the full HTML. I found a bug with the previous method in that it would return the incorrect td if a textarea had a value of FieldName="ColumnName". This new function also allows usage of the static name.
http://jsfiddle.net/iOnline247/zfdLq4cw/