Forum


Replies: 1   Views: 1150
Convert html checkbox to word
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by parasell  · 18-01-2022 - 12:58

Tried following this guide but got the blank result. 

https://www.phpdocx.com/htmlapi-documentation/html-standard/insert-input-field-Word-document-with-HTML

 

Posted by admin  · 18-01-2022 - 13:36

Hello,

We have run this simple script:

$docx = new CreateDocx();

$html='
<label for="fname">Name:</label>
<input type="text" name="fname"><br><br>
<label for="fname">Password:</label>
<input type="text" name="fname"><br><br>
<label for="fcheckbox">Checkbox:</label>
<input type="checkbox" name="fcheckbox"><br><br>
';

$docx->embedHTML($html);

$docx->createDocx('output_html');

and all contents are added correctly to the DOCX, including the checkbox. We have opened the output with all MS Word versions from MS Word 2007 to MS Word 2021, and LibreOffice 7; in all cases the contents appear correctly.

What program are you using to open the DOCX? Please run this same script and check the output using MS Word.

Regards.