UpdateListItems valuepairs

Dec 23, 2011 at 5:01 PM

I am trying to get the following to work.

    $('img[title$="inschrijving"]').click(function()
    {
      if(confirm("U wenst zich in te schrijven voor deze cursus?"))
      {
        params = $(this).attr("data-param");
        alert(params);
        $().SPServices({
          operation: "UpdateListItems",
          async: false,
          listName: "Inschrijvingen",
          batchCmd: "New",
          valuepairs: params,
          completefunc: function(xData, Status)
          {
            alert(xData.responseText);
            alert(Status);
          }
        });      
       $(this).parent().css('visibility','hidden');
       alert("U heeft een aanvraag ingediend voor deze cursus.");
      }
      else
      {
        alert("Aanvraag voor deze cursus niet ingediend.");
      }

 The attrribute data-param holds the value [["User_x0020_login","user.login"]].

When executing I get an error stating that one or more field types are not properly installed. I know the field names do exist and are correctly spelled. So something else must be going wrong or I am doing something wrong.

Hope anyone out there can help me. Many thanks in advance.

Coordinator
Dec 23, 2011 at 5:04 PM
It look like you are passing a single value in the valuepairs. It needs to be an array of name/value pairs.

M.