Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a simple PHP form to populate the addText portion of the example #561

Open
duqtape opened this issue Jun 23, 2015 · 1 comment
Open

Comments

@duqtape
Copy link

duqtape commented Jun 23, 2015

I've downloaded/installed PHPWord on my site. I understand how PHPWord works based upon the examples.

I just need a little direction on how to create a simple form and use PHPWord to download the result. Specifically, my students will be filling out a 'form' (read: the answers to the homework), and using PHPWord to download it. I know I could just give them a word doc, but I'd like it to be available on the wiki I've built with notes, powerpoints, lab documents, etc. This way, it's open in a tab while they are working through the lab document on the wiki, and they can save an editable copy, not just a PDF or something as well as I can edit without everyone having to download the file again.

All I really need is a simple example of a question (What color is your hair?), a text area for the student to write it in, and how that answer fits into the addText part of:

$section->addText( htmlspecialchars( '"Learn from yesterday, live for today, hope for tomorrow. ' . 'The important thing is not to stop questioning." ' . '(Albert Einstein)'

I understand how to make a simple get/post PHP form. I think this is what I want to do, but after hours of searching, I cannot seem to find a simple example of using a form to replace the hard coded addText in this example.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@maximeplante
Copy link

I have created a little example code doing this : https://gist.github.com/Max840/8802fafb7ae61b243986

Hope this helps!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants