How to add title of node (where order form was placed) to custom line item order in commerce Alright I added a custom line item order form to a node. I read that somewhere the link to the node on which the order form was used gets saved within the order, but I need the title of the node where the order form was used to place the order. Currently I added a entity reference field which uses a view to just display the title of the actual node and the user needs to select the value manually. But I want this to be automatic and hidden if possible, how could I go about it? 

Actual try: I tried to setup a rule to make this possible, but I am not able to do it since I am not able to access the data of of my content node and the form at the same time. I tried it with a simple rule, a component and last but not least through the rules forms module
I found a pretty bad solution: I added to the node template the following jquery, which really just writes the node title of the current node to a field in the line item.

&lt;script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"&gt;&lt;/script&gt;
&lt;script&gt; 
    $(document).ready(function(){
        var title= $('#page-title').text();        
        $('#your-line-item-field-id').val(title );
        $('#your-line-item-field-id').prop('disabled', true);
});
&lt;/script&gt;