I have a page with one field only. How can user submit the page by pressing 'Enter' without having to click the 'Submit' button?
I did:
Create a dynamic action
Event: KeyDown
Selection Type: Items(s)
Item: P1_ENTER
Client-Side Condition > Type: Item is not null
Item: P1_ENTER
Create a True Action
Action: Execute JavaScript Code
JavaScript Code:
// check if enter key pressed
if(event.which == 13)
{
// specify your page item
apex.submit('P1_ENTER');
}
I did these steps but the simple application doesn't work.
Can anyone help me please?