use createUUID() as a form variable
I first create a uuid using CreateUUID().
<cfset genID = createUUID()>
Following I dynamically create a form checkbox with the CreateUUID() result as name as following:
<cfinput type="checkbox" name="A#genID#">
So far, so good.
When I jump to the action page and try to check if the chechbox is checked I get a syntax error for the chexbox name.
<!--- COMPLETE CODE --->
<cfset myvar = "#createUUID()#">
<cfform>
<cfinput type="text" name="#myvar#" value="#myvar#">
<cfinput type="submit" name="btn" value="OK">
<hr>
<cfif isDefined('form.#myvar#')>
OK
</cfif>
</cfform>
<!--- ERROR --->
Parameter 1 of function IsDefined, which is now form.8E1C3559-E3D0-6094-B1FBD9B6B1DBE493, must be a syntactically valid variable name.
The error occurred on line 6.
Any solution anyone?
