Section | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
...
Then on your table, set the CSS Class 'table-scroll'.
Add Horizontal Scroll Bars to a Table
Horizontal scrolling of tables works on tablets/phones but not on desktop. Lack of scrolling on desktop greatly limits the number of columns a table may contain. The only solution is the widen the form. However, you can apply this custom javascript at the project level to show horizontal scroll bars on your table control in desktop view.
Warning |
---|
|
Code Block |
---|
// frevvo custom JavaScript
var tableScrollSetup = false;
var CustomEventHandlers = {
setup: function (el) {
if (!tableScrollSetup) {
if (document.getElementsByClassName('table-scroll').length > 0) {
var elements = document.getElementsByClassName('table-scroll');
for(var i=0; i < elements.length; i++) {
elements[i].style.overflowX = "scroll";
elements[i].style.overflowY = "visible";
elements[i].style.tableLayout = "fixed";
}
tableScrollSetup = true;
}
}
}
} |
Automatically submit a form
This JavaScript example is relevant to Forms only. Let's say you have a new customer registration Form A that is normally forwarded to Forms B and C to complete registration for a new user. Returning Users skip Form B and go directly to form C.
This JavaScript example will automatically submit a form if a certain control has some specific value (say “not-new”) in it when the form is loaded. This might be useful in cases where a form needs to be submitted to post the data in it, but interaction between the form and user is not necessary. If the user's input is not required, this custom JavaScript can submit the form automatically.
...
This JavaScript example will submit the form when the user presses the Enter key. If you want to do this in a workflow, change SubmitView.doSubmit("Submit"); to FlowView.getFlowButton().onclick();
...