Skip to main content
Participant
December 21, 2009
Question

cf 8 format flash submit

  • December 21, 2009
  • 1 reply
  • 764 views

I'm unable to use a keypress "enter" key to submit a rich internet form for action. Is this normal or is there a setting on the cfinput to allow a keypress to submit form?

This topic has been closed for replies.

1 reply

Inspiring
December 22, 2009

Hi,

Try something like this,

P.S : Modify the code according to your need.

<cfform action="" method="post" name="searchform" format="flash" id="searchform" timeout="180" height="250">
    <cfformgroup type="tile">
      <cfinput
          type="text"
          name="searchtext"
          required="yes"
          id="searchtext"
          width="150"
          message="You must enter text in the search field"
          onKeyDown="if(Key.isDown(Key.ENTER)) {submitForm()}"
      >
      <cfinput type="submit" name="search" value="Search" id="submit" tabindex="0">
    </cfformgroup>
</cfform>

HTH

Participant
December 22, 2009

After doing EVEN MORE research, I finally found the answer is in the Accessibility attribute of your form. Once you set it to "yes" it is the spacebar that initiates the form submission instead of the "Enter" key. Kind of a bummer, but I think it's due to the functionality of the screen reader devices that blind people use to read these forms and not a shortcomming of Adobe. I think this anser can be used to "force" the submit button to work upon the key press of the "Enter" field. Thanks for the code!