CODE: Mobile Optimization

How to make your Knack app more mobile friendly

Navigate to the bottom of this article if you would like to copy and paste the entire mobile template

Form Views

Increase size of form submit buttons

    /* Increase size of buttons with type="submit" */
  button[type="submit"] {
    height: 64px !important;
    font-size: 32px !important;
    min-width: fit-content;
    width: 100%;
  }

Increase font size for form field labels

 /* Increase font size of form field labels */
  .kn-label {
    font-size: 22px;
  }

  .kn-detail-body {
    font-size: 22px;
  }
  
  .kn-read-only {
    font-size: 22px;
  }

Increase height of text fields

Increase height of email fields

Increase font size of checkbox options

Screen Selection

Increase height of selected fields

Increase height of container surrounding selected fields

FA Icons

Increase size of Font Awesome icons

Buttons

Increase size of search button

Increase default menu button size

Increase default size of "Choose File" button

CSS Full Template

This code block has all the CSS knack form changes in it. Can copy and paste into CSS editor in Knack and will see the changes in the mobile environment.

Active in these Applications

Mobile Code

TDS

RPP

Data Tracker

Signs & Markings

Banners

ROW

DTS

HR

Finance

Parking Enterprise

VZA

SMO

Visitor Sign In

Submit Buttons

No

Yes

Yes

No

Form Labels

No

Yes

Yes

No

Form Fields

No

Yes

Yes

No

Screen Selections

No

Yes

Yes

No

FA Icons

No

Yes

Yes

No

File Buttons

No

Yes

Yes

No

Menu Buttons

No

Yes

Yes

No

Search Buttons

No

Yes

Yes

No

Detail Labels

No

Yes

No

No

Last updated

Was this helpful?