House of Fusion
Search over 2,500 ColdFusion resources here
  
Home of the ColdFusion Community

Mailing Lists
Home /  Groups /  ColdFusion Talk (CF-Talk)

retreive the FORM name?

  << Previous Post |  RSS |  Tree View |  Sort Oldest First |  Subscribe to this Group Next >> 

retreive the FORM name?

At 02:32 PM 5/21/2004, you wrote: Alexander Sherwood 05/21/2004 02:34 PM
> Sure, but a template can contain several forms which Dave Watts 05/21/2004 02:27 PM
> Any one knows if it is possible to retreive the form name Dave Watts 05/21/2004 01:18 PM
What if you give the submit buttons unique names.  That way you can GFSCold 05/21/2004 12:38 PM
>>Try this, just a thought. Claude Schneegans 05/21/2004 12:35 PM
>>Since only one form can post per request it is presumed that you will Claude Schneegans 05/21/2004 12:33 PM
Claude, Guy Rish 05/21/2004 12:12 PM
Try this, just a thought. Bryan F. Hogan 05/21/2004 12:11 PM
not via CF.  you'd need to put it in a hidden form field. Charlie Griefer 05/21/2004 12:08 PM
Hi, Claude Schneegans 05/21/2004 11:58 AM

05/21/2004 02:34 PM
Author: Alexander Sherwood Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32690#164014 At 02:32 PM 5/21/2004, you wrote: ----- Excess quoted text cut - see Original Post for more ----- You could also FUSEBOXIFY the form and bury the form name in .DSP and .QRY files nested 8-10 levels deep amd call its FUSEACTION.... ;-) Seriously, if you have several forms, why not add a hidden form field in each form with the name of the form as the value? Then your action page could look at the one hidden field, grab its value and then know what form was submitted? Hope this helps. ----- Excess quoted text cut - see Original Post for more ----- ---------------------------------- Alex Sherwood PHS Collection Agency THE COLLECTORS P:   813-283-4579 F:   301.664.6834 W: www.phs-net.com
05/21/2004 02:27 PM
Author: Dave Watts Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32690#164007 > Sure, but a template can contain several forms which > all call the same template, even if only one is submitted. > My question is then to detect the one that fired the > template. You will then need to send additional information within the form itself. Alternatively, you could simply build a single form, and simply respond to the form variables you receive within your action page. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444
05/21/2004 01:18 PM
Author: Dave Watts Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32690#163987 > Any one knows if it is possible to retreive the form name > from the template fired by a form? No, that isn't passed to the server when the form is submitted. Dave Watts, CTO, Fig Leaf Software http://www.figleaf.com/ phone: 202-797-5496 fax: 202-797-5444
05/21/2004 12:38 PM
Author: GFSCold Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32690#163981 What if you give the submit buttons unique names.  That way you can check which form you are processing by the name of the submit button that was pressed. Jim Audette Website Administrator Garrison Forest School 300 Garrison Forest Road Owings Mills, MD 21117 jim_audette@gfs.org 410-559-3128
05/21/2004 12:35 PM
Author: Claude Schneegans Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32690#163978 >>Try this, just a thought. Ok, but it is precisely what I'm looking a simpler solution for. -- _______________________________________ See some cool custom tags here: http://www.contentbox.com/claude/customtags/tagstore.cfm Please send any spam to this address: piegeacon@internetique.com Thanks.
05/21/2004 12:33 PM
Author: Claude Schneegans Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32690#163975 >>Since only one form can post per request it is presumed that you will know because of the form's Sure, but a template can contain several forms which all call the same template, even if only one is submitted. My question is then to detect the one that fired the template. -- _______________________________________ See some cool custom tags here: http://www.contentbox.com/claude/customtags/tagstore.cfm Please send any spam to this address: piegeacon@internetique.com Thanks.
05/21/2004 12:12 PM
Author: Guy Rish Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32690#163972 Claude, Since only one form can post per request it is presumed that you will know because of the form's linkage to the ACTION.   If you are using one uber ACTION handler then create a hidden INPUT that contains the name of the form.  This can lead to problems though and it not the better choice.  If your uber ACTION handler is handling so much stuff that such a thing matters then you should consider breaking it out into multiple templates. rish Hi, Any one knows if it is possible to retreive the form name from the template fired by a form? -- _______________________________________ See some cool custom tags here: http://www.contentbox.com/claude/customtags/tagstore.cfm Please send any spam to this address: piegeacon@internetique.com Thanks.
05/21/2004 12:11 PM
Author: Bryan F. Hogan Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32690#163970 Try this, just a thought. <cfif isDefined('form.submit')>   <cfdump var="#form#"> </cfif> <script> function checkForm(theForm)  { document.forms[theForm.name].theFormsName.value=theForm.name; return true; } </script> <form action="test.cfm" method="post" name="formName" onsubmit="return checkForm(this)"> <input type="hidden" name="theFormsName" value=""> <input type="submit" name="submit" value="submit"> </form> Claude Schneegans wrote: > Any one knows if it is possible to retreive the form name from the > template fired by a form?
05/21/2004 12:08 PM
Author: Charlie Griefer Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32690#163968 not via CF.  you'd need to put it in a hidden form field. just out of curiousity...why would you need the form name? > Hi, > > Any one knows if it is possible to retreive the form name from the template fired by a form? ----- Excess quoted text cut - see Original Post for more -----
05/21/2004 11:58 AM
Author: Claude Schneegans Short Link: http://www.houseoffusion.com/groups/cf-talk/thread.cfm/threadid:32690#163966 Hi, Any one knows if it is possible to retreive the form name from the template fired by a form? -- _______________________________________ See some cool custom tags here: http://www.contentbox.com/claude/customtags/tagstore.cfm Please send any spam to this address: piegeacon@internetique.com Thanks.
<< Previous Thread Today's Threads Next Thread >>

Search cf-talk

May 24, 2012

<<   <   Today   >   >>
Su Mo Tu We Th Fr Sa
     1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31     

Designer, Developer and mobile workflow conference