billions-fireman-81445
01/23/2025, 2:39 PMutm_source
, that will be rendered in the generated UI as a hidden input?brief-egg-61061
01/23/2025, 2:39 PMbrief-egg-61061
01/23/2025, 2:39 PMutm_source
that will be rendered in the generated UI as a hidden input. This can be achieved by using the "Hidden input node" feature in Ory Kratos. To implement this, you need to modify your identity schema to include the hidden attribute. Here's an example of how you can add a hidden input for `utm_source`: json { "$schema": "<http://json-schema.org/draft-07/schema#>", "type": "object", "properties": { "traits": { "type": "object", "properties": { "utm_source": { "type": "string", "title": "UTM Source", "<http://ory.sh/kratos|ory.sh/kratos>": { "credentials": { "password": { "node_type": "input", "type": "hidden" } } } }, // ... other properties ... } } } }
In this example, we've added a utm_source
property to the traits
object. The <http://ory.sh/kratos|ory.sh/kratos>
extension is used to specify that this field should be rendered as a hidden input in the UI. When this schema is used, Ory Kratos will generate a hidden input field for utm_source
in the UI. This field won't be visible to users but will be included in the form submission. For more information on customizing identity schemas and UI nodes, you can refer to the following Ory documentation: 1. [Customize identity schemas](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema) 2. [Understanding UI nodes and error messages](https://www.ory.sh/docs/kratos/concepts/ui-user-interface#hidden-input-node) Remember to test your implementation thoroughly to ensure it works as expected in your specific use case.