• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

CF Flash forms

New Here ,
Oct 26, 2009 Oct 26, 2009

Copy link to clipboard

Copied

I've built a few Flash forms in Dreamweaver and they only submit with the spacebar key, I can't find how to use the enter key to submit the forms? One is a really simple search field with a submit button, and I think users would likely want to just type and hit enter the way they would with a regular form.

Also the submit button in some forms is in a formgroup (hbox) under a few other fields and it is aligned to the far left, while the other fields are further over. I tried setting a left margin but that only stretched out the button. What's the best way to position it?

Views

2.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Advocate , Nov 17, 2009 Nov 17, 2009

Hi Nevesky,

Try this code, it works.

<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=
...

Votes

Translate

Translate
LEGEND ,
Oct 30, 2009 Oct 30, 2009

Copy link to clipboard

Copied

Can you post your code, pls.

--

Adam

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 02, 2009 Nov 02, 2009

Copy link to clipboard

Copied

This is one of them. Even if I tab over to the button the enter key doesn't submit it. Spacebar does.

<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">
      <cfinput type="submit" name="search" value="Search" id="submit" tabindex="0">
      </cfformgroup>
    </cfform>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Nov 17, 2009 Nov 17, 2009

Copy link to clipboard

Copied

Hi Nevesky,

Try this code, it works.

<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>

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Nov 18, 2009 Nov 18, 2009

Copy link to clipboard

Copied

LATEST

That works great, thank you so much! I looked everywhere for this. Much appreciated.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation