Search code examples
phppdfcheckboxmpdf

mpdf showing a radio button and checkbox selected


I have a quick question.

I creating an pdf output when the user clicks on the button. However the problem I'm having is the radio and checkbox. I tried to use the standard
($answer == 'What the value is' ) ? 'checked':''

however when it is outputted to a pdf, it doesn't show the radio button or checkbox selected. Is there way I can have the radio buttons or checkbox's selected in an pdf output?

Thank you


Solution

  • Ok, I have found a solution. What I did was I put the the checkbox and radio button in if statement and I did put the code in the following format:

    <input type="radio" checked="checked"> Yes
    

    That did the trick..