DeX Posted November 14, 2010 Share Posted November 14, 2010 I have a purchase order displaying on a site that the user can edit quantities for. I want them to be able to hit submit and it takes that form and submits it to some code that auto creates a PDF with it. The PDF part is easy, I use DOMPDF to create that and it works fine, I just can't seem to get the values passed through. I can easily pass the values of just the input boxes through the $_POST but I don't want to have to recreate the PDF setup after the post. I'd rather just use some Javascript or something to grab the innerHTML of a <div> element and somehow make it available after the form is submitted so the PHP code can use it to send to DOMPDF. The form submits to itself and I have a piece of code at the top of the page which will create the PDF, I just need the <div> contents and I'm done. How do I get it? I could set it into a hidden variable but the reason I'm not doing that is because for some reason when I assign the big table which contains the whole purchase order into the hidden variable and then try to print it, it comes out all messed up. I don't know why and I'd rather just find another way than attempt to figure that out. Quote Link to comment https://forums.phpfreaks.com/topic/218621-how-can-i-pass-contents-through-a-form/ Share on other sites More sharing options...
kenrbnsn Posted November 14, 2010 Share Posted November 14, 2010 Code? Quote Link to comment https://forums.phpfreaks.com/topic/218621-how-can-i-pass-contents-through-a-form/#findComment-1134006 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.