AndrewSimm
Well-known member
The first entity titled "honors" list all honors a player could have. A second entity called "HonorResults" list which honors a player actually has. I am creating a player update page where a staff member can update what honors the player has
Here is how I get both in the controller
Here is how I display the checkboxes
I am trying to check the check boxes when the values exist within "HonorResults"
Here is how I get both in the controller
PHP:
//Get honors
$repo = $this->repository('CIS\Backend:Honors');
$finder = $repo->findHonors();
$honors = $finder->fetch();
//Get honor results
$repo = $this->repository('CIS\Backend:HonorResults');
$finder = $repo->findHonorResults();
$honor_results = $finder->where('id',$id)->fetch();
Here is how I display the checkboxes
HTML:
<xf:checkboxrow>
<xf:foreach loop="$honors" value="$honor">
<xf:option name="honors[]" value="{$honor.manage_honor}" label="{$honor.manage_honor}" />
</xf:foreach>
</xf:checkboxrow>
I am trying to check the check boxes when the values exist within "HonorResults"