Jump to content
Sign in to follow this  

block inputs (custom fields)

Recommended Posts

I hope someone has knowledge about this ..

I find very little information about it. I hope someone helps me.

I am trying to prevent users from being able to change some fields in their profile.

I found the following function:



add_hook('CustomFieldSave', 1, function($vars) {
    return array('value' => 'overridden value',);

this prevents any field from being editable,

however, how can I select a specific field?



someone posted an idea in 2019.

however it doesn't work, because fieldid and relid return NULL from $vars

any idea?

I just need to select the fields that I want to prevent from being edited.



Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

  • Similar Content

    • By postcd
      I would like to use https://www.stopforumspam.com/usage to block spammers, current reCaptcha does not seem to be effective for contact form SPAM tickets.
      So any idea how to implement it, for example to WHMCS 6.x? v6 hcaptcha module?
      My other idea was firewall and mod security. But that is just a theory.
    • By Dika John
      Hello there,
      Is it possible for http request using PUT method in addon module ? If possible,  any ideas how to use it ?
      Please help me
      Thank you
    • By error 404
      Domain Search is not working for some domain
      I am using WHMCS 8. When i am trying to search for .org domain it's showing unavailable. 
      i have tried to fix this. not working... 
      how can I resolve this issue? 
      here is a Screenshot of my problem.....

    • By sixullc
      I'm running WHMCS v8.4.1 (current as of this post) and PHP v7.4.28. In the System Health Status there is the following warning:
      The next version of PHP is 8, which WHMCS does not support. So I can't figure out why is WHMCS throwing a warning for this? I'm using the most current version of PHP supported by WHMCS and there is nothing I can do. This seems ludicrous.
    • By Businezz
      I have a few custom pages created and they all end with .PHP extension of course.
      What i want to do is, remove .PHP extension only on custom pages, not entire WHMCS site.
      Ex. domain.com/page.php to domain.com/page And, at the end if i type website.com/page.php to be redirected to domain.com/page and still to be able to access domain.com/page directly.
      I've been searching for this for a very long time and i can't find any solution.
      Any idea, feedback, help will be much appreciated.
  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated