Jump to content

WHMCS dropdown custom field value.


phannh

Recommended Posts

I would have thought this would be better as a product custom field rather than a client custom field - as client custom fields apply to the client and what happens if a client wants an account in each location??

 

I know the documentation says the above friendly names should work, but frankly I don't know if the docs are out of date or the feature is bugged - if it were me, i'd just use 'server14b124,server65412b' (or whatever is applicable to your situation)in the custom field and use a Smarty replace in the template to display the friendly name.... that's just going to be one line of code in the template... and whilst you could do it as a hook, you'd end up manipulating the array and that's going to take more than one line of code!

Link to comment
Share on other sites

  • WHMCS Developer

The output that you have here is by design. The full value of the selected item is saved, where only the "Friendly" value is displayed to the client and in the dropdown.

 

It is not possible to change this as the full value would be need to be able to display the currently selected option.

 

If you need to use the value elsewhere, there is a hook, CustomFieldSave, that you can use to grab the value and adjust it as you need - http://developers.whmcs.com/hooks-reference/everything-else/#customfieldsave

 

I hope this helps you.

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