WordPress.org

Forums

User Meta Manager
[resolved] Make custom fields read only? (4 posts)

  1. Dan Maby
    Member
    Posted 10 months ago #

    Hi, how can I make a number field read only for all except admins? I see a six month old thread with the same question but the answer doesn't really explain the steps taken.

    Any advise appreciated.

    https://wordpress.org/plugins/user-meta-manager/

  2. President McCheese
    Member
    Plugin Author

    Posted 10 months ago #

    Add the "readonly" attribute to the field.

    In UMM's custom meta editor, in the "Additional Attributes" field, you would enter -
    readonly

    or

    disabled="disabled"

    The value can still be changed by admin using UMM's interface.

    Important note: This does not prevent data from being passed by a malicious user. A user can manipulate the DOM with a code inspector and then submit the form.

  3. Dan Maby
    Member
    Posted 10 months ago #

    Appreciate the support and info!

  4. Jamues
    Member
    Posted 3 months ago #

    Hello,
    If I do read only a user profile field, I can't modify it. from user administrator for example.
    I need the user profile fields are read only for all users except user's administrator.

    Thank you very much.

    Regards.

Reply

You must log in to post.

About this Plugin

  • User Meta Manager
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic