⟵ hearthere ⟶
  • Quick start
  • Install MIT
  • Install PRO
  • Updating
  • Optimization
  • Update v4-v5
  • Backups
  • Console utility bin/totum
  • Basics for users
  • Interface and Layout
  • Tables and their parameters
  • Prefilter
  • Fields and their parameters
  • Syntax
  • Code, actions, formatting
  • Relational relationships
  • Calculation order and calculation units
  • Auto-complete calculations and timing
  • Duplicate rows and cycles
  • Comparisons
  • Functions
  • Debugging
  • Print and CSV
  • API
  • Roles and users
  • Notifications
  • Scheduled Actions
  • System tables
  • Trees
  • Anonymous tables
  • External Forms
  • Quick Forms
  • General Form Settings
  • Form Field Settings
  • Passing Parameters to the Quick Form
  • Passing Parameters to a Hidden Field in the Form from JS
  • Exporting and importing tables
  • [PRO] MeiliSearch
  • [PRO] Databases
  • [PRO] Custom CSS
  • [PRO] Custom docs
  • [PRO] LDAP AD
  • [PRO] File versions
  • [PRO] List-unsubscribe
  • [PRO] Dynamic fields
  • [PRO] Only Office
  • [PRO] Auth Tokens
  • [PRO] 2FA
  • [PRO] Superlang
  • [PRO] Daemons
  • [PRO] Profiler
  • Connecting functions
  • [SRV] Installation and Connection
  • [SRV] Export, PDF, Upload, and Preview
  • [SRV] XLSX/DOCX Generators
  • PRO External Forms

    Analog of anonymous tables designed using material-ui.

    Examples ⟹

    Integrates into any page by inserting js-code.

    Quick Forms

    YouTube Video 1 ⟹

    YouTube Video 2 ⟹

    YouTube Video 3 ⟹

    Based on any simple table and calculated in tree, you can create a quick form. This is a simplified form mode that allows unauthorized users to add rows to the table.

    During the creation process, you need to select the user from whom the form will operate. This user must have a role that can add rows to the target table.

    After creating the form, you will see a link to it and the embed code (if you need to integrate the form into another site's page).

    When creating, the form is assigned a unique name for the schema, and multiple different forms can be created for one table.

    The availability for editing and visibility of fields in the quick form depends on the role of the user accessing the form, as well as the setFormat function of the field formatting code.

    If you need to dynamically hide a field in the form, the table formatting code in the form is not applied — instead, you need to use the hide: "form" = true parameter of the setFormat function.

    The form is a row in the System tablesMainFormsForms TTM table. To edit the form after its creation, you need to edit this row.

    General Form Settings

    If you click on Configure form, you will get access to the general form settings and field settings.

    • Form title — the title on the form page.

    • Table text — arbitrary text between the title and the form.

    • Sections — not used in quick forms (one section quickMain is automatically created, do not delete or change its settings)

    • Main section title for quick formSection parameters applied to fields in the form in JSON format. By default, it is:

      { "fill": true, "maxwidth": "600", "nextline": true }

    • HTML on save — this is the text that will be shown to the user upon successful saving of the row to the table.

    • Totum code on save — this is the code that will be executed after successfully adding a row to the table. The variable $#rowId receives the id of the added row. As a result of this code, you can use:

    • Maximum form width on the main host — the width of the form when opened via the link. If you embed the form into another site, the width is determined by the width of the parent div.

    • Title for the browser — arbitrary browser title when opening the form via the link.

    • Background file URL — path to the background image file when opening the form via the link.

    • Form available only with parameters — if you use the linkToQuickForm function to pass preset parameters to the form, checking this box blocks access to the form without parameters. Access will only be via the link formed by the linkToQuickForm function.

    Form Field Settings

    Key fields:

    • View type — you can set a display type for the field different from the base one.

    • View data — in this field, display parameters for View type are set in JSON format. To fill in by template, right-click and select Default.

    • Field title — overrides the field title. To disable the title, enter *NONE*.

    The technical field __save is responsible for the save button in the form. In the Code format field, the formatting code determining the button color by default is set — it can be overridden by specifying an arbitrary color.

    Passing Parameters to the Quick Form

    Using the linkToQuickForm function, you can generate an encrypted link containing the values of the specified fields.

    For the values to apply, these fields must be editable when adding for the role of the user from whom the form is launched.

    If you use the fixed parameters, these fields will be locked for the form user.

    Passing Parameters to a Hidden Field in the Form from JS

    A Data type field is added and assigned a viewtypeJS.

    It must be accessible for the role from which the form is called, otherwise, it will not appear in the DOM. It is visually hidden for the user.

    In the id parameter, set your id by which you can refer to this field in the DOM.

    To pass data to it, you need to:

    <script>
            let interv = setInterval(()=>{
                let element =  document.getElementById('your_id_for_field');
                if(element && element.setTotumValue){
                    clearInterval(interv)
                    element.setTotumValue(JSON.stringify(
                        ["your_data"]));
                }
            }, 100);
        </script>