Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

Update table in database with populated user form

Go to End

2 Posts   2663 Views


31 Posts

14 September 2009 at 7:29pm

Hi All,

I can populate a user form and I now how to submit it into a table i the database, but how do I update with the information I retrieved? This is assuming I make a change to one of the populated fields, like correcting a spelling error or modifying a date.

I use this function to submit new info to the database:

function submitform($data, $form) {

// Create a new Member object and load the form data into it
$submission = new StudentData();

// Write it to the database. This needs to happen before we add it to a group



I'm guessing a fairly simple modification of the function above will allow me to update my table with my currently populated fields.

Thanks in advance.


Community Member, 12 Posts

31 January 2010 at 3:36am

that's exactly my problem as well.
I'd be glad for the hint also.

I see that the objects ID is not available in the form (if I force it then I get a dropdown list with all IDs (or actually filled with the return values of the getTitle() function).

I also noticed there's a SecurityID field - but I couldn't yet find out about its meaning.

Well, I'll post here as I find the solution... before someone else posts it... ;-)