Skip to main content
2Charlie
Inspiring
March 17, 2016
Answered

How to submit a form to itself?

  • March 17, 2016
  • 3 replies
  • 3874 views

I have a cfform on the page. When I submit the form, I want to submit it to self. Another word, I do not want to submit to another .cfm page. So, how do I do it?

    This topic has been closed for replies.
    Correct answer Carl Von Stetten

    If you omit the action attribute, it should submit to itself.

    3 replies

    BKBK
    Adobe Expert
    March 17, 2016

    Old school: action="#CGI.SCRIPT_NAME#"

    Carl Von Stetten
    Carl Von StettenCorrect answer
    Brainiac
    March 17, 2016

    If you omit the action attribute, it should submit to itself.

    2Charlie
    2CharlieAuthor
    Inspiring
    March 17, 2016

    Cool! I'll test that tomorrow. Does that apply to all browsers or only certain browser?

    Dave Ferguson
    Participating Frequently
    March 18, 2016

    Okay, since the submit button does not work, I have another question. Do I need to use CFFORM and CFINPUT if it's just a simple form? The only thing I need is able to grab all the form values in the same page and then do a cfhttp to a json api.


    I would avoid using CFForm all together.  It offers you nothing but a boat load of extra js loaded in and possible headache later.  There are much better ways do what it can do for you.

    Brainiac
    March 17, 2016

    It's dated but I think it still applies. I wrote a tutorial on this several years back: EasyCFM.COM - View Tutorial

    Hope this helps.