I have the following scenario. I have a form where the text fields and radio buttons are blank. I’m using SPServices to collect the values entered (in a text field) or selected (through a radio button) to either update or create a new list item.
At the moment, the only two columns that aren’t updating both happen to be lookup columns. With my example below, i’m trying to update the “Person” column with the text that has been entered into the person container (which is using jquery UI to provide an autocomplete on person names from a list)
Any information regarding the above would be greatly appreciated.
At the moment, the only two columns that aren’t updating both happen to be lookup columns. With my example below, i’m trying to update the “Person” column with the text that has been entered into the person container (which is using jquery UI to provide an autocomplete on person names from a list)
["Person", $('#person-container').val()],
I’m having the same problem with a lookup radio button:["Partner", $('input:radio[name=eop]:checked’, ‘.partner-wrapper’).val()]
Here's my full code which is wrapped in a function. $().SPServices({
operation: "UpdateListItems",
async: true,
batchCmd: "New",
listName: "People",
valuepairs: [
["Person", $('#person-container').val()],
["Partner", $('input:radio[name=eop]:checked’, ‘.partner-wrapper’).val()]
],
completefunc: function (xData, Status) {
alert(xData.responseText);
alert('Thank you');
$.fn.colorbox.close();
window.setTimeout(function(){location.reload(true)},9000)
}
});
Marc kindly suggested the following ["Person", "0;" + $('#person-container').val()]. However this unfortunately didn't work. Any information regarding the above would be greatly appreciated.