Jump to content

Changing the Value of a Checkbox (Word 2010)


buckibooster

Recommended Posts

I'm in the final stretch of this project. It 1) takes data from a server-side SQL database using php; 2) generates and saves a xml file to the server; and 3) uses a xsl transform and word template document along with the previously generated xml file to generate a word 2010 document which is pushed out to the client. I've been able to get the word document working just fine for all of the text fields but am having trouble with the checkbox. I want to be able to check or leave un-checked a checkbox in the word template document based upon a value in the xml file. The relevant xslt code section is:

<w:checkBox><w:sizeAuto/><w:default w:val="0"/></w:checkBox>

 

If I could change the default "val" from "0" to "1" based upon the content of the xml file, that would make the change I'm looking for. I've already written code to create a "0" or "1" in the relevant location on my xml file. All I need to know is how to change the xsl transform code based upon a "0" or "1" value in the xml file. Any suggestions would be welcomed.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...