Template variables

In the wdf_confirm.php template, I need to pick up the contribution level (how much was pledged or donated) and the pledge ID. How do I include those in the page template?

I actually need them added to a form generated by Contact Form 7, so if there is a more direct way, all the better. My tactic is otherwise to get these two values and add input elements with javascript to the form.