Hi. ok, I give up, how does the {ParseAsHTML} directive work?
I’m trying to include a radiobutton group in my template, and added the {ParseAsHTML} directive, hoping that would allow entry of html code, but no luck.
I tried adding this directive at the top of the document, and inline with each html element specification, but no luck
I also tried clicking the “source” button in the cke editor, and adding the html code in source mode. Also no luck
Is it possible to add a radiobutton group to a template (other than the supplied y/n and true/false pairs)?
Thanks
Just converts text EOL to html <br>
If you wish to add new components to use in templates that are used to replace in templates go here: src/Services/DocumentTemplates/DocumentTemplateRender.php
See private function doSubs($s, $formData): mixed
Ok, so I made this. Seems to work, for showing a radiobutton group. Saves radiogroup state, and redisplays the selected rb if the document is shown again in portal or in Auditing tool in openEMR. Rb’s don’t show in generated pdf, though
@hanksterr7
okay, you’re close Hank. I fixed to work but modified for RadioGroupInline and RadioGroupStacked for different U.I.
Beware that when including the $formData object save and restore for for is automatic so it didn’t work for you because you had syntax error in your PHP.
One problem is you should allow for multi words in options i.e Radio one_Radio two etc.
I’ll give you the source here in a bit then let me know by tomorrow and i’ll put in patch 3.
Ah, ok. You show the radio group differently in the Audit screen, vs the portal. In the Audit screen, you just show the selected RB value. And that would then pass to the pdf generation without difficulty. Nice!
Generally anything going to Audit are flattened forms meaning, rendered to a resolved document.
Others like questionnaires won’t get flattened until Print or sent to Documents. This way a questionnaire can be revised later for additional edits.
Notice I allow for multi word options for the use case of a series of statements or questions.
I applied your modified 3 files to my patch 7.0.2(1) system and things are not working. The cke editor controls are no longer showing when I attempt to edit a template. And nothing shows in the portal when I select the template that has been sent to a patient. I expect I need to apply patch 2 to solve these issues. Anything else I should consider? Thanks