Jump to content

Pull some code form custom field on profile page to make href on summary page.


Recommended Posts

Hi everyone. I am a newbie to this so please go easy

 

I have been using WHMCS for a while as it makes life easy for a novice such as myself.

I have a little understanding of coding but nothing on par with some of you guys. I know this job is relatively easy and will potentially only take a few minutes to impermanent but unfortunately i haven’t the knowledge, hence why I’m posting on here.

 

Basically i have created a custom field which is showing up on the "Client Profile" page.

I have created a link on the "Client Summary" page but i was wondering if this link on the client summary page could be pulled from the website address i put into the custom field i have created in the profile:

 

EG: Currently my custom field on the profile page reads "AdWords Group"

I wish to add a website address into this field (without the http:// as WHMCS will not allow me to add this into there for some reason, I’m guessing security).

I then need to be able to click on my summary page, then by clicking on the link that says "Google Adwords" (See Attachment) it then just does a target blank, href to the webpage i have added into the custom field on the profile page.

 

Also, the link would need to add the https:// as the site i need to access won’t come up unless i have https:// in there.

So the href link would need to be something like {"https://" + "the url"} (which i have added in custom field box)"

 

Hope this make sense,

 

Any help would be greatly appreciated.

 

Thankswhmcsforum.jpg

Link to comment
Share on other sites

{php}
$userid = $this->_tpl_vars['clientsdetails']['userid'];
$result = mysql_query("SELECT value FROM tblcustomfieldsvalues WHERE relid=$userid AND fieldid=###");
$data = mysql_fetch_array($result);
$value = $data[“value"];
echo $value;
{/php}

 

Just change ### with the field id. and put that on the template which you want to show the link on.

 

It should work however I did not test it.

 

If you need more help please contact us on https://gh.bh/cp/submitticket.php?step=2&deptid=2

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