Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

error on form field names

New Here ,
Aug 11, 2008 Aug 11, 2008
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
TOPICS
Advanced techniques
326
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 11, 2008 Aug 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.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Aug 12, 2008 Aug 12, 2008
LATEST
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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources