I have a Knack public-facing Knack input form for people to register as users on a system. This form is shown to many different classes of users, and I have created a mapping file that customizes it using JavaScript. A URL query parameter selects the mapping to use, which controls fields to require, fields to hide, fields to pre-fill with what, etc. I have posted this JavaScript in the Show and Tell section of the Forum But my post here is about a remarkable native Knack feature connected to this.
After an Admin user creates a Track Mapping, a preview of the resulting signup form is shown, below an inline editable Grid to show the mapping record just created. What blew my mind is that as changes are made in the grid, the form shown below adapts in real time to whatever is changed. For example, if you add a field reference to “Fields to Hide”, it immediately disappears in the preview. If you add a pre-filled value and the field is visible, the value appears immediately in the form. You always see exactly what the public will see.
I did not deliberately do anything to make this happen. I expected to have to add a custom button to redisplay the preview after changes. But no. You see the result immediately. Never in a million years did I expect that to happen. Bravo Knack!
Anyone with a similar need, see my other post in the Development category and contact me if you have questions.