0

Is there a way to have each row in a list have it's own form elements (text box's, drop downs, buttons, etc.) and update each item rather than use datasheet view?

I want to create a list where the a button can be used to add attachments. If I can do that, I'm wondering if I can I add form elements for data entry as well?

1 Answer 1

0

If you are using SP 2013 / 2016 (and maybe 2019?) on-premises, then yes, you can, but it will be a lot of work.

What you could do is use the Client Side Rendering (CSR) framework to override the rendering for each of the fields when looking at the regular list view. Instead of doing the default rendering of the field's value, render the control you want (button, textbox, drop-down, etc.). Then you would have to include additional code to hook into whatever event on the element you want to trigger saving, and save the data back to the list item. Probably using the REST API would be the easiest for that.

If you don't want to directly override the fields that hold data, you can add dummy fields to a view, and use those for your controls.

The only other issue I can think of is that if you update a list item, you will either have to manually update the value of the field in the view, or trigger a page refresh so that the view reflects the new value.

A good intro article on CSR here.

Some info on using the REST API here.

1
  • thank you for mentioning Client Side, as my solution will require client side...no server side or Designer. I'll research CSR and give it a try.
    – adams-j
    Commented Dec 6, 2019 at 21:38

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.