Ask a Question related to Coldfusion Flash Integration, Design and Development.
-
theoriginaldrizz #1
Disabling REQUIRED fields in FLASH FORM TABS
Here is an example of how to work around required Flash form fileds that are on
another tab when submitting a paged form:
The sample below uses a simple form the add/edit a stored URL... Basically you
can just add an arbitrary value (in this case "0") to the required fields on
other tabs in the same Flash form upon submit. Then your form action routine
handles the rest-- omitting the unwanted fields for the required action.
Best regards and happy coding,
Andy Driscoll
----------------------:D
<cfsavecontent variable="addSubmit">
qlURL.text='0';
</cfsavecontent>
<cfsavecontent variable="editSubmit">
qlURLAdd.text='0';
</cfsavecontent>
<cfif IsDefined("form.upLink") >
<!--- DO YOUR UPDATE CF QUERY HERE and redirect (back to this page, for this
example) --->
<cfquery datasource="#data_source#" name="userLinks">
UPDATE myTableName
SET ql_link_address = '#form.qlURL#'
WHERE ql_key = #form.qlKey#
</cfquery>
<cflocation addtoken="no" url="#CGI.SCRIPT_NAME#" />
<cfelseif IsDefined("form.addLink") >
<!--- DO YOUR INSERT QUERY HERE and redirect --->
<cflocation addtoken="no" url="#CGI.SCRIPT_NAME#" />
<cfelse>
<!--- Look up record(s) --->
<cfquery datasource="#data_source#" name="getLinks">
SELECT myKeyFieldName, myURLField
FROM myTableName
</cfquery>
<!--- You could use a CFGRID here and bind to the form below... --->
<!--- END CFGRID... --->
<!--- RENDER THE FORM --->
<cfform format="Flash" width="100%">
<cfformgroup type="tabnavigator">
<!--- Begin EDIT Form TAB --->
<cfformgroup type="page" label="Edit">
<!--- Begin EDIT Form Elements --->
<cfinput name="qlKey" type="hidden" value="#getLinks.myKeyFieldName#">
<!--- OR BIND THIS FORM TO A GRID --->
<cfinput name="qlURL" size="30" type="text" label="URL:" required="yes">
<cfinput name="upLink" value="Update" type="submit"
onClick="#editSubmit#"/><!--- DISABLES THE ADD FIELDS --->
</cfformgroup>
<!--- Begin Add Form TAB--->
<cfformgroup type="page" label="Add New">
<!--- Begin Form Elements --->
<cfinput name="qlURLAdd" size="40" type="text" label="Link URL:"
required="yes">
<cfinput name="addLink" value="Add" type="submit"
onClick="#addSubmit#"/><!--- DISABLES THE EDIT FIELDS --->
<!--- End Add Form --->
<cfformgroup type="page" label="Reset All">
</cfformgroup>
</cfformgroup>
</cfform>
</cfif>
theoriginaldrizz Guest
-
Problem passing hidden fields using Flash form
I'm working with Flash forms for the first time, and am having problems passing information in hidden fields. The information was passed from prior... -
Dynamically Adding Form Fields to CF Flash Form
I think I know the answer to this but, after some failed Googles, I wanted to double-check here. I have a Flash-based event registration form I'm... -
Validating 2 password fields in flash form.
I am creating a standard signup page with 2 password fields -- in order to validate the password was entered correctly, is there a way to compare... -
javascript and flash form fields
I have a coldfusion flash form with a button that opens a popup window which has a large textarea to type into, when the user clicks save I want the... -
Font used for flash form tabs
Does anyone know which font is used for the flash form tabs? Is this user changeable? If so, how is this accomplished? Thanks.



Reply With Quote

