This content has been marked as final. Show 4 replies
1) i do hope you have action attribute defined for the form, not an empty string as in your code sample... if you comment out <cfargument name='title' ...> line in your cfc, is it telling you that you are not passing 'doc' now?
2) as your code seems to be all good, maybe try renaming the form field in question to 'jobtitle'... and of course change this name in your cfc and in cfinvokeargument tags
cfdump/cfabort are your freinds.
Use it with your form before your cfinvoke tag.
Make all your cfarugments optional and then use the dump/abort on your arguments, right after the cfargument tags.
Everything in your code seems to be fine.
Try general debugging using CFDUMPS. If does not work try passing the whole
form object to the method : -
> <cfif IsDefined ('Add_Job')>
> <cfinvoke component="#Jobs#" method="AddJob">
> <cfinvokeargument name="FormObj" value="#Form#">
> <cffunction name="AddJob" access="public" returntype="void">
> <cfargument name="FormObj" required="yes" type="struct">
> <cfquery name="Addjob" datasource="***">
> INSERT INTO EmpJobs (title, doc, catid)
> VALUES ('#arguments.FormObj.title#', '#cffile.serverfile#',
You don't have a closing <cfinvoke> tag after the <invokearguments>, so CF
is thinking you're not passing any args into the <cfinvoke> call.
This is one place where I think CF should enforce having an explicit