I have a form widget that is updating the displayed name once the user inputs a clock number, the issue is its only updating the name once the user clicks off of the clock number input field. I am using the template helper program to show/hide some other fields and calculate the user's name. Is there any way to make it so when the user presses Enter, the helper program gets called? I have the helper program set to "At form creation and each time a field is changed"
Announcement
Collapse
No announcement yet.
Using Enter Key to Update Form
Collapse
X
-
The form helper process is currently being reworked. The next update will handle this for you as the form helper can be called once user input stops. If you cannot wait for the next update then the following steps should give you what you need:- Open your application in NAB
- Locate your form widget and click the settings for it
- Give your form a "name" (located in the left side form). For this example, I will call it "myForm".
- Click the behaviors button
- Under "Startup", add a new action: Execute Script (see script below)
Code:var myForm = getWidget('myForm'), myField = myForm.down('[name=NAME_OF_MY_FIELD]'); myField.on({ buffer : 500, // wait for 500 seconds of inactivity before calling form helper change : function(cmp){ myForm.onChangeField(cmp); }}); success();
Comment