Search code examples
c#phphtmlsharepointweb-parts

Keeping values in textboxes permanently until changed by user in a sharepoint webpart


I am working on a Visual Web Part for a SharePoint 2013 site that is a "scoreboard" for people to track progress on a project. Basically what I have is a lot of textboxes that users will enter values in. I want the values to stay in the textbox until someone changes it.

<tr>
    <td>&nbsp;</td>
    <td>A-Crew</td>
    <td>B-Crew</td>
    <td>C-Crew</td>
    <td>D-Crew</td>
</tr>
<tr>
    <td>Daily</td>
    <td>
        <input id="msaCrewDaily" type="text" />
    </td>
    <td>
        <input id="msbCrewDaily" type="text" />
    </td>
    <td>
        <input id="mscCrewDaily" type="text" />
    </td>
    <td>
        <input id="msdCrewDaily" type="text" />
    </td>
</tr>

A few things I have tried are using PHP inside the input tag to save the value but it doesn't keep it after closing and re-opening the page with webpart on it. I've thought about using local storage but i'm not sure if that will work.

My Question

Is there a way to keep the the input even if the page is closed? If not would it be better to set up a list as a Data Source? Is the something I could do in C# to keep the values?

Other Information

This is a temporary solution until a database is set up then the values will come from there. However its going to take some time to set that up. Also as of now all my code is HTML and CSS. Any help or ideas are very much appreciated and thank you in advanced!!!


Solution

  • So my understanding is each user opens the page and edits the value right? Then why not create a simple list with the required columns you create one item with default 0 values/or whatever you want. And send the display Item form url to all the users. Whoever wants to edit, will just click on edit and save the form. You can in fact just add this on the page enabling the inline editing and share the page with others.