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 ramf
      I need some help with the LogActivity hook.
      I want to trigger the hook only when in the description there is `Email Sending Failed ` error.
      I guess I should add some IF statement - but don't know how to do it....

      This is my code
      How can I trigger it only when the description have the `Email Sending Failed` information?
      Thanks for your help!
    • By ashkan.khalili
      hello everyone ... 
      Today i have just update WHMCS to 8.3.1 and after update, when i try to login to admin or even as a client, on clientarea.php shows an error like this : 
      Whoops\Exception\ErrorException: Module 'apcu' already loaded in Unknown:0 Stack trace: #0 /home/..../public_html/hub/vendor/whmcs/whmcs-foundation/lib/Utility/Error/Run.php(0): WHMCS\Utility\Error\Run->handleError(32, 'Module 'apcu' a...', 'Unknown', 0) #1 [internal function]: WHMCS\Utility\Error\Run->handleShutdown() #2 {main} when i reload the page for several times, it redirects to "mysite.com/login" and gets user/password and then when i enter the user/pass again shows the same error ...!!!!
      i have tried a lot to find something but nothing is out there ! ! ! 
      would you guys please help me solve this problem !? 
      Thanks in advance 
    • By error 404
      The information you’re about to submit is not secure
      Because this form is being submitted using a connection that’s not secure, your information will be visible to others.
      when user trying to login to their account from client area login panel. but the problem is showing that error.
      i checked at https://www.whynopadlock.com/ and here is the result.....
      A form with the action of "http://example..com/dologin.php" exists in the source code of the tested page.
      This form needs to be updated to use "https://example.com/dologin.php" or another secure URL for your padlock to return.
      How can i solve this error? i am using updated WHMCS!

    • By Huseyin Telli
      Hello, I am designing a custom order form for myself in whmcs. I changed the domain name selection part when purchasing hosting. I did as in the attached image. The transfer part is not working. In the transfer part, it performs the domain inquiry part. However, when I click the continue button, the domain configuration page does not appear. In other words, the page where I will enter the transfer code does not open, it transfers it directly to the cart. The domain name I selected for the product does not appear in the cart. I will show them all in the appendices below. If it is a javascript-related problem, if there is javascript code that I need to share, if you let me know in the comments, I will share it. I don't know exactly what is causing the problem. I would be glad if you help. Thanks in advance.. 

    • By trewhost
      Hi Team,
      Suddenly not showing Browse our Products/Services not showing. how to enable it ? 

  • 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