Checkgroup not showing as checked in output Doc
Posted: Mon Mar 13, 2017 3:30 am
Hi
I am trying to display a checkgroup in an output document.
I have tried all the forum solutions, and can't get it working.
The output doc does not show the checkboxes (checked or unchecked) in work or pdf
Would be gratefull if someone has a working example they could upload ?
this is the example i am currently testing (PM 3.1)
Checkgroup Dynaform Variable = CurrentOutpatientTreatmentOrder
Key = 1 Label = MarkOrder1
Key = 2 Label = MarkOrder2
Key = 3 Label = MarkOrder3
Output Doc HTML
I am trying to display a checkgroup in an output document.
I have tried all the forum solutions, and can't get it working.
The output doc does not show the checkboxes (checked or unchecked) in work or pdf
Would be gratefull if someone has a working example they could upload ?
this is the example i am currently testing (PM 3.1)
Checkgroup Dynaform Variable = CurrentOutpatientTreatmentOrder
Key = 1 Label = MarkOrder1
Key = 2 Label = MarkOrder2
Key = 3 Label = MarkOrder3
Output Doc HTML
Code: Select all
Trigger befor Output Doc
<form>
<input type="checkbox" value="1" @#MarkOrder1> Option 1<br>
<input type="checkbox" value="2" @#MarkOrder2> Option 2<br>
<input type="checkbox" value="3" @#MarkOrder3> Option 3<br>
</form>
Code: Select all
$aSelected = explode('|', @@CurrentOutpatientTreatmentOrder);
if (in_array("1", $aSelected)) //asumiendo que 1 es el valor de una opción en el checkgroup
@@MarkOrder1 = "checked";
else
@@MarkOrder1 = "";
if (in_array("2", $aSelected))
@@MarkOrder2 = "checked";
else
@@MarkOrder2 = "";
if (in_array("3", $aSelected))
@@MarkOrder3 = "checked";
else
@@MarkOrder3 = "";