Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Password field type #318

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Password field type #318

wants to merge 1 commit into from

Conversation

Jaza
Copy link

@Jaza Jaza commented Jul 29, 2024

With this change, if you define:

defmodule MyApp.UserAdmin do
  def form_fields(_) do
    [
      password: %{type: :password}
    ]
  end
end

Then it will display an input of type "password" in the kaffy create/edit form.

Ideally, kaffy could also infer that it should be a password input, based on the schema field having redact: true . But, as far as I can tell, from some quick debugging, that isn't coming through to build_html_input/6 . Anyway, with this change, you can at least force a given field to have a password input.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant