App Builder \ PfJs Helper Class
Auto Submit | PfJs.autoSubmit(target)

App Builder & Automation Expert
Stay Updated with ProcFu!
Subscribe to our newsletter for the latest tips, updates, and automation insights.
Subscribe NowPfJs.autoSubmit(target);
This function automates the submission process of a detail form, enabling the form to save its content and automatically transition to the next screen without requiring user interaction.
Arguments
- target: The target variable from the On Render event, typically representing the jQuery DOM wrapper of the current screen. (Do not change the word target. Use it as is; it is not a placeholder to be replaced.)
Usage
PfJs.autoSubmit is used by passing it the target form element that you wish to be submitted automatically. Once invoked, this function submits the form, saves the data, and proceeds to the next predefined screen in your application.
Example: Auto-Submit on Field Change
In this example, the auto-submit functionality is configured to trigger when there is a change in the "status" field of a form. This is particularly useful in applications where immediate action is required once a specific field is updated.
$('div[data-field="status"] select[name="status"]').change(function() {
PfJs.autoSubmit(target);
});