Created
February 11, 2020 08:47
-
-
Save RHMason/1bcdda96b9d3cf115a46770d5b2d33fc to your computer and use it in GitHub Desktop.
CFC for Nuxt form example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfcomponent extends="taffy.core.resource" taffy:uri="/nuxtPreso"> | |
<cfheader name="Access-Control-Allow-Origin" value="*"> | |
<cfheader name="Access-Control-Allow-Methods" value="GET,PUT,POST,DELETE" /> | |
<cfheader name="Access-Control-Allow-Headers" value="Content-Type" /> | |
<cffunction name="post" access="remote" output="true"> | |
<cfargument name = "title" default="" required="true"> | |
<cfargument name = "title2" default="" required="true"> | |
<cfargument name = "title3" default="" required="true"> | |
<cfset var local = {} /> | |
<cfquery name="local.nuxtCreate" datasource='mmcfugpreso'> | |
INSERT INTO nuxtPreso (name,company,email) | |
VALUES ( | |
'#title#', | |
'#title2#', | |
'#title3#' | |
) | |
</cfquery> | |
<cfreturn NoData() /> | |
</cffunction> | |
</cfcomponent> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment