-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
Add a Checkbox to a template #425
Comments
Hi, I was going to open this issue as well. I need to use checkbox in templates now and adding checkbox functionality to new documents was not hard thing and I think a little but not too hard to do it with template files. I dont know If someone else already done or trying to implement it but once I have enough spare time from work I am going to take a try. |
Looks like no any news? |
Hmm looks like.
|
Ozilion, I don't know if this helps you any, but I just used the setValue and used __ or x's. I know this isn't an ideal solution, but it's something. :) |
I am already doing that, writing variable words but the most correct way is to use checkbox and my client asking me to use checkbox. |
I totally agree. :) Just wanted to give you a tip.
|
Still waiting 🔢 |
1 similar comment
Still waiting 🔢 |
Still waiting |
At least if we can set value of checkbox in template, would be great, too! |
I've tried PHPDocx template features. They have function named thickChecboxes to set value of specified checkboxes in templates. Here is the sample code from their trial pro package. setLanguage('tr_TR'); $variables = array('check1' => 1, 'check2' => 0, 'check3' => 1); $docx->tickCheckboxes ($variables); $docx->createDocx('example_tickCheckboxes_1'); This function uses variable entered in statusText field of checkbox and working like a charm as we expected too 👍 :) I don't know if already PHPWord has similar feature but may be we can also implement such a way. I could use PHPDocx to check checkboxes but it takes so long time to process. As an example with PHPWord i can finish a job in 10 seconds, with PHPDocx it takes around 2 min and i tested without using tickCheckbox function. |
用setValue把关键字替换成xml代码 |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. |
Fixed by #2509 |
Hello!
Loving the power behind PHPWord by the way!!
I was wondering if there's a way to add a checkbox to a template. I've seen how to do it to a new document, but what about a template? I thought about going the Wingding symbol route, but haven't been able to figure out how to change font styles on a template (well besides opening it up in word and changing the font styles there, but Wingdings..well the symbols don't translate well.
Can anyone give an tips?
Thanks!
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
The text was updated successfully, but these errors were encountered: