Warp Matrix demo — a row × column input field for Filament: stock by size and color, prices, permissions. Change anything; the data is reset every hour. warpui.com About Warp Matrix Docs Ask a question Support
Skip to content

Cell rules and validation

Not every size comes in every color, some counts must not be changed, and some numbers are wrong. Each table below is the stock of the crew-neck tee by size and color, and each shows one of these cases. Click “Show what would be saved” under a table to check it.

Combinations that do not exist

->hiddenCells() marks cells that do not exist: they are shaded with diagonal lines, nothing can be typed in them, and they are not saved or counted.

Note: Try it

Olive is not made in XS or XL: those two cells have diagonal lines. Click “Show what would be saved”: the saved value of xs and of xl has no olive.

Stock of the crew-neck tee
Size
Black
White
Navy
Olive
XS
XS × Olive — Not available
S
M
L
XL
XL × Olive — Not available

Cells that cannot be changed

->disabledCells() shows a cell but does not let anyone change it. The server ignores any change sent for it and keeps the value it had.

Note: Try it

XL is no longer made: try to type in the XL row — nothing changes. The other rows can be changed as usual.

Stock of the crew-neck tee
Size
Black
White
Navy
Olive
XS
S
M
L
XL

Limits on the numbers

->numeric(min: 0, max: 200) takes numbers from 0 to 200. A cell outside the limits is outlined in red, and the message under the table names the cell.

Note: Try it

Type 500 in M × Black and -3 in S × White, then click “Show what would be saved”: the two cells are outlined in red, and the messages say “S × White: enter 0 or more.” and “M × Black: enter 200 or less.”

Stock of the crew-neck tee
Size
Black
White
Navy
Olive
XS
S
M
L
XL

Every cell must be filled

->required() asks for a value in every cell (cells that do not exist or cannot be changed are skipped).

Note: Try it

Two cells are empty: M × Navy and L × White. Click “Show what would be saved”: both are outlined in red and named in the message. Type a number in each and click again.

Stock of the crew-neck tee*
Size
Black
White
Navy
Olive
XS
S
M
L
XL