Skip navigation
neve_m
Currently Being Moderated

CF Flash forms

Oct 26, 2009 1:15 PM

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?

 
Replies
  • Currently Being Moderated
    Oct 30, 2009 7:34 PM   in reply to neve_m

    Can you post your code, pls.

     

    --

    Adam

     
    |
    Mark as:
  • Currently Being Moderated
    Nov 17, 2009 7:41 AM   in reply to neve_m

    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>
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points