I need to open an entityform in a modal popup. I have got this working using ‘Modal operations’ and ‘Modal forms’ modules following this guide: http://julian.pustkuchen.com/en/comment/reply/599. My link looks like the following:
<a href="modal/entityform/job_application/nojs/0" class="ctools-use-modal ctools-modal-modal-popup-large btn"><?php print t('Apply') ?></a>
The problem now is that I need to pass certain data (e.g. the nid) of the currently viewed node into the entityform.
I am happy to use hook_form_alter or similar, but obviously hooking the entityform has no knowledge of the currently viewed node. My other, pretty hacky, idea was to grab data with javascript and put it in that way, but I need some sort of popup event to work from, which I don’t think exists.
Is there another approach to this I could be using, or am I going down the right track?