How to pre-fill form fields with data from the node? I have a site that list different courses that take place in real life (not virtual courses). For each course, there are different fields :


title of the course
start date
end date
place where the course will happen
type of course
...


With View I have created a table that list all the courses. I would like that logged users can subscribe to a course by just clicking on it, and then I would receive an e-mail (or see in the back-end) that tells me that user X has subscribe to course Y (and I will have in the same time all the informations about the course the user subscribed to : title, dates, place...)

For the moment when a logged user click on a course, another page loads that displays informations about the course, and a form where the user have to write out again all the informations in blank fields...

Is there a way to pre-fill the form fields with the informations of the course ?

Or is there a smarter way to do this ?

Thanks
You could use Prepopulate module to prefill fields in subscriptions. But:

I would redesign the model in order not to save the same information you already have in courses again with the subscription. It's redundant to store title, date, place, etc. twice, with all the implications changes of the primary information in courses would have.

Said this content type "subscription" only should save a entity reference to courses. I propose to add a link to each course in Views which allows to subscribe to it. To do this, follow this steps:


Add field "ID" and check "Exclude from display".
Add "Global: Custom text" to your fields and put a label like Subscribe. 
Under Rewrite results, check "Output this field as a custom link".
In field "Link path" enter node/add/subscription?edit[course]={{nid}} - where "course" is the name of entity reference field in content type subscription and "nid" is the replacement pattern for the course id.
Install and activate Prepopulute module


Clicking a subscription link in Views should now open subscription form and prefill the referenced course field. Making a custom module would allow you to create this content type without showing the form to the user.