Section | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
|
...
A Tab control with many fields in each tab, may require a long scroll to switch from one tab to another. You can use a trigger control at the bottom of the first tab with a business rule to navigate the user to the second tab when the trigger is clicked. For example, when you click on the Next Tab trigger control on the Personal Information tab in the Application for Employment form shown a business rule will navigate the user to the Employment History tab.
You can use the following JavaScript to force the page to be scrolled to the top after switching to the second tab:
...
You have a new customer registration Form ( A ) that is normally forwarded to Forms B and C to complete registration for a new user registration. Returning Users skip Form B and go directly to form C. A workflow with a precondition that skips a step or a templatized value of a control to decide where the user should be forwarded using Business Rules are recommended approaches and should be considered. This JavaScript allows the user to bypass a form when it is not required and can be used if the recommended approaches are not possible. It will automatically submit a form if a certain control has some specific value (say “not-new”) in it.
...
Add conditional-submit to the CSS Class property of the control whose value is to be compared.
Extra Submit button
The default theme applied when forms are created in has a submit By default, each form has a submit button located at the end of the form. The forms designer lets you easily add additonal submit buttons in a special area at the end of a form only. You can use the following JavaScript to display create an extra submit button. Add a trigger control to your form and set auto-submit in the CSS Class property. Now you can use this trigger control as your Submit button and place it anywhere on your form.
...
Code Block |
---|
var CustomEventHandlers = { setup: function (el) { if (CustomView.hasClass(el, 'extra-submit')) { FEvent.observe(el, 'click', this.autoSubmit.bindAsObserver(this, el)); } }, autoSubmit: function (evt, el) { FlowView.getFlowButton().onclick(); } } |
Prevent Session Timeout
The Sometimes you may need the session timeout for a particular form to be a lot longer than the default session timeout that makes sense for your entire tenant. Imagine your tenant session timeout in is set to 30 minutes. One of your forms takes a long time to fill out. You want to allow idle periods greater than 30 minutes for that form only.
...
This JavaScript will change the session timeout for this form to 6 10 hours. Change the variable sessionInterval in the script to the desired time period, for example, a 2 4 hour session timeout would be: var var sessionInterval = 1000 * 60 * 2; // milliseconds to minutes .4;
Code Block |
---|
var sessionInterval = 1000 * 60 * 10; // milliseconds to minutes var sessionRefreshURL = "/frevvo/web/login"; refreshFrevvoSession = function () { // make the request var xmlhttp; if (window.XMLHttpRequest) xmlhttp = new XMLHttpRequest(); // IE7+, Firefox, Chrome, Opera, Safari else xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); // code for IE6, IE5 xmlhttp.open("GET", sessionRefreshURL + "?sessionRefresh=" + new Date().getTime(), true); xmlhttp.send(); // set the timer to run again setTimeout(refreshFrevvoSession, sessionInterval); } setTimeout(refreshFrevvoSession, sessionInterval); // set the initial timer |
...