Forum

Thread tagged as: Question, Comments, Members

Prepopulate member name to comment

Is there a way to pre-populate the name and email fields in the comment form (comment app) with the logged in member (from the member app)?

Martin Elliff

Martin Elliff 0 points

  • 6 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

You can pass in any value to a template - including form fields - using PerchSystem::set_var().

So something along the lines of

PerchSystem::set_var('commentName', perch_members_get('first_name'));