I'm attempting to use SPServices to create items in a custom list that are of two different custom content types but I can't seem to get it right.

If I don't need to specify the content type of the item I want to add, it woks perfectly so I know my code is essentially good. I'm just not sure how to specify which content type SPServices should create.

Has anyone ever done this before?

1 Answer 1


This was a typo on my part. I was not putting the ContentType field into the pairs array as an array itself.

The right way:

pairs.push(['ContentType', this.get('contentTypeIdName')]);

The wrong way (and how I was doing it):

pairs.push('ContentType', this.get('contentTypeIdName'));

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.