Posts made by Itamar Tzadok

The field id tag is rendered as the id attribute of the html input element of the field. The number is the field id. So for instance, if you have in your activity a text field called Text and the field id happens to be 367, then the pattern [ [Text#id] ] will be rendered as field_356. If you inspect the html of the entry form you will see somewhere there something like

<input class="basefieldinput" name="field_367" id="field_367" value="" type="text"></input>

which is the html input element if this text field.

The tag may be useful for accessing the input elements in the entry form with javascript. For instance, you can add javascript that changes the background color of the input box when it has content. Of course, for this to work the javascript should reside in the template rather than the js tab because the the tag can be rendered only in the template. But if your javascript is complex you can put it in js tab and add to the template only minimal javascript the calls the required function and passes to it the tag, something like

<script type="text/javascript">// <![CDATA[
do_something_really_complex_to_input_element("Text#id");
// ]]></script>

hth smile



Average of ratings: Useful (1)