User attribute read-only for update

I need read-only user attribute just for update or first login with IDP.
e.g I have filed id-card and need for sign up but read-only for update how can do this?
if I change theme and add it to hidden input or change it to read only maybe some user change it by browser inspect so can change it.
in user attribute have option who can edit and this must when user uncheck it must need in register and don’t show or read-only in update.
please help me how solve it

Can’t you use the user profile for this?

Let me try to restate your problem.:

You have created a user attribute in the “Realm Settings” → “User Profile” section of the admin UI, and configured it to be read-only (i.e. “View”) by the user. When the user registers or logs in, you’d like the user to be able to provide this information once and then not be able to edit it again? Is that correct?

I don’t believe what you want is possible “out of the box” in the declarative user profile feature. It would be possible using a custom authenticator or registration form that accepts the attribute you want, and then writes it to the attribute, but that requires building custom extensions.

If there is a way to achieve this with the built-in declarative user profile feature, perhaps @edewit can be a bit more constructive and helpful, and tell us how.

exactly I need this.
I’m JavaScript developer and I know little about java and I create some custom extensions but for this I think I can’t write do you know any extensions for this scenario?

I’m not aware of such an extension that exists.