how to save the choice field values and people and group value using jquery in new custom form sharepoint list

suresh p 1 Reputation point
2020-12-19T05:11:26.143+00:00

I have created new custom form and new save button. but i could not able to save the choice field values and people and group field values using jquery.

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,231 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Jerryzy 10,566 Reputation points
    2020-12-22T05:37:58.08+00:00

    Hi @suresh p ,

    I will update the code for insert data into Checkbox choice field and multiple people and group filed, both of them should use array as data type, please check out the code in attachment:

    50289-code.txt
    50293-snipaste-2020-12-22-13-34-28.png

    50362-snipaste-2020-12-22-13-31-44.png

    50294-snipaste-2020-12-22-13-31-34.png

    My field setting will like below:

    Choice(checkbox type with "Choice1/2/3" value)

    50312-snipaste-2020-12-22-13-36-21.png

    Person and group field:

    50257-snipaste-2020-12-22-13-37-22.png

    Thanks
    Best Regards


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.
    0 comments No comments

  2. Jerryzy 10,566 Reputation points
    2020-12-21T07:26:23.31+00:00

    Hi @suresh p ,

    Sample Jquery Rest API code to add item with Multiple value Person field and choice field, please check the code in attachment file:

    49780-code.txt

    49779-snipaste-2020-12-21-15-20-19.png

    49931-snipaste-2020-12-21-15-21-24.png

    Thanks
    Best Regards


    If an Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  3. suresh p 1 Reputation point
    2020-12-22T03:45:08.88+00:00

    Hi @Jerryzy-MSFT ,

    Thanks for your answer, I want to save the sharepoint people and group field and choice field, I've created a custom new form, and added the input save button. when click on the save button all fields data should be saved the backend list. i can able to save the all fields except the choice field(check box) and people and group fields.