Jump to content

Append Text to Hostname


JustScott

Recommended Posts

Hi,

We want to append a string,  'xyz.com', to the server. hostname value in our order form.

So if customers enters 'bill', it will be saved as 'bill.xyz.com'

I've tried just appending and cat, but this doesn't save it to the database.

Can anyone provide a clue as to the best way to do this?

I'm pretty new to both WHMCS and Smarty.

Thanks in advance,

Scott

<tr><td class="fieldlabel">{$LANG.serverhostname}:</td><td class="fieldarea"><input type="text" name="hostname" size="15" value="{$server.hostname}" /> {$LANG.serverhostnameexample}</td></tr>

 

Link to comment
Share on other sites

1 hour ago, pRieStaKos said:

Have you tried appending xyz.com to `value="{$server.hostname}"` ?

that would rely on the user adding their hostname before it (as it would be shown in the field) and/or not removing it - if they remove it, then the additional text won't be added on submission.

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