Forum

Thread tagged as: Question

First letter value of field

Is it possible to get only the value of the first letter of the field? It 's working if the whole value is equal.

<div id="review__circle" <perch:if id="commentName" value="E">class="orange"</perch:if>>
<perch:blog id="commentName" encode="false" html="true" type="text" label="Comment Name" order="7" chars="1"/></div>
Edward Johansen

Edward Johansen 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

Yes, you can do that with format, e.g. format="C:1"

https://docs.grabaperch.com/templates/attributes/format/