Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8510405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T03:41:43+00:00 2026-06-11T03:41:43+00:00

I have a form which creates a new record in a table. It is

  • 0

I have a form which creates a new record in a table. It is a series of
text-edit fields each with a field from the same dataset. When I click
a button an ajax workflow is run that commits the new values to the
database.

Is there a way to make it so that hitting Return/Enter does the same
thing, the way web forms usually work?

The code I’d like to be able to use is like this:

<behaviors xmlns="urn:aviarc:widget:com.aviarc.toronto.widget.core.action">
    <when>
        <events>
            <event event="add_problem_record_button.onClick" />

            <!-- how do I ensure this is the Return key? -->
            <event event="add_problem_record_form.onKeyUp" />
        </events>
        <do>
            <call-ajax-workflow name="add-problem-record" />
        </do>
    </when>
</behaviors>

My main issue is how do I test that it was the Return key that was
pressed?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T03:41:45+00:00Added an answer on June 11, 2026 at 3:41 am

    The text-edit widget provides the onEnterKey event:

    <when>
        <events>
            <widget-event name="text-edit-1.onEnterKey"/>
            <widget-event name="submit.onClick"/>
        </events>
        <!-- do stuff -->
    </when>
    

    More generally, if you need to find out the keyCode in an event handler, you can access it from the event-parameters dataset:

    <when>
        <events>
            <!-- all these events should provide a keyCode parameter -->
            <widget-event name="my-text-edit.onKeyDown"/>
            <widget-event name="my-text-edit.onKeyUp"/>
            <widget-event name="my-text-edit.onKeyPress"/>
        </events>
        <alert message="{$event-parameters.keyCode}"/>
    </when>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a button which creates form elements on click . My addelement function
I have a table called order which has many order_items , each order_items is
I have a signup form of which most fields are pre-filled using user's Facebook
I have a form which I create manually (a lot of JavaScript in it...).
I have a form with multiple textboxes which are created dynamically, now all these
I have created one jsp form which contains the username textfield. On the click
I have created a form on which two components are present, button and progressbar
I have created a PHP form which requires the user to select a postcode
I have a form created in Windows Forms which is draggable wherever I click.
I have a requirement to create a windows form control which has to detect

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.