I have an array of object, one of those objects has an attribute that is a string (description), This description does not appear in an INPUT text field ONLY, but appears to print inside div tags just fine.
Just before the display, i did a die print, here's that output:
Expand|Select|Wrap|Line Numbers
- Array
- (
- [0] => ViolationVO Object
- (
- [id] => 299
- [caseID] => -1
- [citationID] => -1
- [noteID] => -1
- [amendedFromID] => -1
- [amendedToID] => -1
- [dispositionCode] =>
- [commonCode] =>
- [violationCode] => 004
- [description] => "THIS IS A TEST NUMBER 2"
- [points] => 4
- [amount] => 200.00
- [lastUpdate] =>
- [byUser] =>
- )
- )
Here's my smarty (html) display.
[PHP]{foreach from=$caseEditPage->getViolationVOList() item=violationVO}
<tr>
<td><input type="hidden" name="violationID[]" id="vID{$count}" value="{$violationVO->getID()}" />
<input type="text" class="field4" name="violationCode[]" id="vCode{$count}" value="{$violationVO->getViolationCode()}" onblur="organizeViolationTable();getDescriptionAnd Point(this, {$count});" /></td>
<td><input type="text" class="field6" name="violationDescription[]" id="vDesc{$count}" value="{$violationVO->getDescription()}" /></td>
<td><input type="text" class="field3 alignRight" name="violationPoints[]" id="vPoints{$count}" value="{$violationVO->getPoints()}" /></td>
<td><input type="text" class="field3 alignRight" name="violationAmount[]" id="vAmount{$count++}" value="$ {$violationVO->getAmount()|number_format}" onblur="convertToCurrency(this.id)" /></td>
</tr>
{/foreach}
[/PHP]
The problem is on the 5th line.
This same foreach is done else where on the page, but not in to a text box and it appears fine.