Jump to content

Disable user custom field edit


zelatech

Recommended Posts

Hi, I have to disable editing the custom field after registration (VAT for example).

 

I tried to delete from clientareadetails.tpl

 

{if $customfields}
{foreach from=$customfields key=num item=customfield}
<div class="control-group">
<label class="control-label" for="customfield{$customfield.id}">{$customfield.name}</label>
<div class="controls">
{$customfield.input} {$customfield.description}
</div>
</div>
{/foreach}
{/if}

 

but on client details page i get error "Custom Field required"

 

any idea how to?

 

thanks

Link to comment
Share on other sites

check out the code at the end of the post below...

 

https://forum.whmcs.com/showthread.php?117198-Extending-My-Details-in-Clients-area&p=473562#post473562

 

{if $customfields}
               {foreach from=$customfields key=num item=customfield}
                   <div class="form-group">
                       <label class="control-label" for="customfield{$customfield.id}">{$customfield.name}</label>
                       <div class="control">
                           {$customfield.input|replace:'/>':'readonly />'|replace:'<select':'<select disabled'} {$customfield.description}
                       </div>
                   </div>
               {/foreach}
           {/if}  

that will disable all text custom fields from being edited. :idea:

Link to comment
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.

Guest
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.

  • 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