Hello,
I have implemented (what I thought was) a fantastic tweak on SP 2010 using SPServices, but it seems there is a bug.
Context:
I have 2 Lists:
The code is integrated in a separate html file, and included in the form via a Content Editor.
It is working fine. Or so I thought.
any info welcome. I hope my request is clear and hasn't already been answered elsewhere.
FYI I am running jQuery 1.7.2 and SPServices 0.7.1a
Have a nice day,
Hubert.
I have implemented (what I thought was) a fantastic tweak on SP 2010 using SPServices, but it seems there is a bug.
Context:
I have 2 Lists:
- Trainings
-
Enrollments (which contains a lookup field: Training, from the list above)
The code is integrated in a separate html file, and included in the form via a Content Editor.
It is working fine. Or so I thought.
<script type="text/javascript">
$(document).ready(function (){
var selects = $('.ms-lookuptypeintextbox');
if (selects.length > 0) {
$(selects).each(function(index, value) {
$().SPServices.SPComplexToSimpleDropdown({
columnName: $(this).attr('title')
});
});
}
document.getElementById("SPComplexToSimpleDropdown_Training").value = GetURLParameter('Training');
function GetURLParameter(sParam)
{
// this function works and is out of context
}
});
</script>
Here's the catch:- if I change the value of the dropdown, the value is saved OK;
-
if I leave the default value, however, the item is saved with a wrong value, as if it was taking into account the value of the "actual" (hidden) SP Dropdown instead of the visible one.
any info welcome. I hope my request is clear and hasn't already been answered elsewhere.
FYI I am running jQuery 1.7.2 and SPServices 0.7.1a
Have a nice day,
Hubert.