Skip to main content
Known Participant
August 11, 2008
Question

error on form field names

  • August 11, 2008
  • 1 reply
  • 369 views
Hi.I have a code on admin part which works fine.I did the same code for the web site:

<cfform name="form" id="form" action="#urlPath#submitLinks#extension#" method="post">

<table class="tabformat" border="0" cellpadding="2" cellspacing="1" width="400">
<tr>
<td class="tabhead">Url:</td>
<td class="tabdata"><input type="text" name="linkUrl" value="" size="60"></td>
</tr>
<tr>
<td class="tabhead">Url Text:</td>
<td class="tabdata"><input type="text" name="linkUrlText" value="" size="60"></td>
</tr>
<tr>
<td class="tabhead">Description:</td>
<td class="tabdata"><input type="text" name="linkUrlDescription" value="" size="60"></td>
</tr>
<!--- <tr>
<td class="tabhead">Referring Url:</td>
<td class="tabdata"><input type="text" name="linkUrlRefer" value="<CFOUTPUT>#link.link_referer#</CFOUTPUT>" size="60"></td>
</tr> --->
<tr>
<td class="tabhead">Category:</td>
<td class="tabdata"><select name="linkCategory"><CFOUTPUT query="categories"><option value="#link_cat_id#">#categories.link_cat_name#</option></CFOUTPUT></select></td>
</tr>

<tr>
<td colspan="2" class="tabdata" align="center"><input type="submit" value="Add Link"></td>
</tr>
</table>
</cfform>

but when I submit the form the error is: Element LINKCATEGORY is undefined in FORM.
I've test so many things but it didnt work because doesnt know none of my form fields:

<cfoutput>#form.linkCategory#</cfoutput> OR <cfoutput>#form.linkUrl#</cfoutput>,....

what should I do?what is wrong?
thanks
This topic has been closed for replies.

1 reply

Inspiring
August 11, 2008
Since your action page is a combination of 3 variables, it's possible that your code is on the wrong page.

cfdump your form at the start of your action page and see what variables actually are there.
Known Participant
August 12, 2008
the action goes to the right page.when I write <cfoutput>hello</cfoutput> I can see it on action page,but when I write <cfdump var="#form#">the result is STRUCT[EMPTY].
I really have no idea what is wrong.