Loading ...
Sorry, an error occurred while loading the content.

5015[Cheetahtemplate-discuss] variables in template

Expand Messages
  • Redhorse, Olivia J. (WSTF-RD)[Jacobs Tech
    Jul 12 8:32 AM
      #for $i in $hdrcol:
      #set $fldvalue = ‘$’ + ‘spform[spdata].sp’ + str( $i )
      <input type=”text” name=”testfield” value=”$fldvalue”/>
      #end for
      In the code above, the input value $fldvalue will display $spform[spdata].sp0 and not the actual value from spform dictionary.  I am trying to create an incrementing value such as; sp1, sp2, sp3,..etc in $fldvalue to retrieve that values from the dictionary into the input field.  It continues to display as a string and I cannot figure out how to display the value from dictionary.  How can I accomplish this?  I hope this makes sense. Thanks, Olivia
    • Show all 2 messages in this topic