Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ListAppend

Status
Not open for further replies.

Cold

Technical User
Feb 19, 2002
6
US
Hello,
Does anybody know how to use ListAppend in comination with form variables in stead of query variables?
If so can you please show me how?
I tried the following:

<form action=&quot;test.cfm&quot; method=&quot;post&quot;>
<input type=&quot;text&quot; name=&quot;letter&quot; size=&quot;1&quot; maxlength=&quot;1&quot;><br>
<input type=&quot;submit&quot; value=&quot;do&quot;>
</form>

<cfif IsDefined ('form.letter')>
<cfset update = Valuelist(form.letter)>
<cfoutput>list is #update#</cfoutput>
<cfset already = ListAppend(update,&quot;#form.letter#&quot;,&quot;,&quot;)>
<cfoutput>list is now #already#</cfoutput>
</cfif>

thanx
 
Hey Cold,

I'm not sure what you're trying to achieve but the valuelist() function is supposed to be used on queries and not other objects such as form variables. If you want to take a form variable and just append it onto an existing list, this should do it.

<cfset already = listappend(already,form.letter)>

Let me know if I'm misunderstanding your question,
GJ
 
OK
I know what I wanted to know. Thanx any way.

PS
I forgot to pass its value onto the next page with a hidden formfield.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top