I am using a simple bind statement:
<cfform name="myform" method="post" >
First Name: <cfinput type="text" name="firstname" required="yes"><br>
<cfinput type="text" size="60" name="email1"
bind="cfc:/cfdocs/ZH/Controllers/CalendarServices.getEmailId()">
</cfform>
The function getEmailId looks like:
<cffunction name="getEmailId" access="remote">
<cfargument name="firstname" type="string" required="true">
<cfreturn "#arguments.firstname#@zhtest.com">
</cffunction>
The bind works "locally," i.e., without using CFCs. The CFC works if I call it from a CFM page, but it is not being called from the bind.
I know CF is looking at the correct file. If I change the path or function name, or change the access to anything but "remote", it gives me an error. However, CF does not give me an error even though I have made the firstname
argument required. What am I doing wrong? Is there a security setting that prevents CFCs from returning a value?
If you decide to use binding, change your cfinput tag to pass the variable and also add the bindonload attribute: