21308 Posts in 5737 Topics by 2603 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 1813 Views |
-
Update table in database with populated user form

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();
$form->saveInto($submission);// Write it to the database. This needs to happen before we add it to a group
$submission->write();
Director::redirectBack();
}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.
-
Re: Update table in database with populated user form

31 January 2010 at 3:36am
Hey,
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... ;-)
| 1813 Views | ||
|
Page:
1
|
Go to Top |

