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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Form Questions /

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

populate form with users data


Go to End


2 Posts   2997 Views

Avatar
danzzz

Community Member, 175 Posts

21 September 2009 at 8:02pm

hi,

how can I populate a form with the users data which is logged in?
I generated the form with scaffoldFormFields.

the form is only accessable for logged in users, I set this up on
the "Access" Tab.

thx
daniel

Avatar
danzzz

Community Member, 175 Posts

22 September 2009 at 12:32am

solved with help from silverstripe IRC channel :-)

it seems there is more help than in this form - very much key questions dont have an answer.

$member = Member::currentUser();
$form->loadDataFrom($member);

daniel