Skip to Content Skip to Menu

[SOLVED] Create a web address automatically with user input text

  • camppos
  • camppos
  • OFFLINE
  • Posts: 27
  • Thanks: 1
  • Karma: 0
12 years 10 months ago - 12 years 10 months ago #226224 by camppos
How can I do the following:

A user has a Url address from a website for instance facebook.com/username

I would like to create a field where the user only input their 'username' or members id and it automatically added the facebook.com (for this instance)

in other words:

user enter: 1830

URL address: websiteaddress.com/1830

note: this web address is totally different from our website. Is just a field that will be populated by user and be display just the same way that name, lat name, etc. is display. I just need to add automatically the web address before what the input on the filed.


Thank you,

Jesus
Last edit: 12 years 10 months ago by krileon.

Please Log in or Create an account to join the conversation.

  • krileon
  • krileon
  • ONLINE
  • Posts: 50258
  • Thanks: 8599
  • Karma: 1470
12 years 10 months ago #226265 by krileon
Create a normal text field, integer field, or whatever type of field you need for them to supply a value. Then use a delimiter field with substitutions to construct the actual output. Example delimiter fields as follows.
Code:
<a href="http://www.website.com/[cb_myfield]">http://www.website.com/[cb_myfield]</a>


Kyle (Krileon)
Community Builder Team Member
Before posting on forums: Read FAQ thoroughly + Read our Documentation + Search the forums
CB links: Documentation - Localization - CB Quickstart - CB Paid Subscriptions - Add-Ons - Forge
--
If you are a Professional, Developer, or CB Paid Subscriptions subscriber and have a support issue please always post in your respective support forums for best results!
--
If I've missed your support post with a delay of 3 days or greater and are a Professional, Developer, or CBSubs subscriber please send me a private message with your thread and will reply when possible!
--
Please note I am available Monday - Friday from 8:00 AM CST to 4:00 PM CST. I am away on weekends (Saturday and Sunday) and if I've missed your post on or before a weekend after business hours please wait for the next following business day (Monday) and will get to your issue as soon as possible, thank you.
--
My role here is to provide guidance and assistance. I cannot provide custom code for each custom requirement. Please do not inquire me about custom development.

Please Log in or Create an account to join the conversation.

12 years 10 months ago - 12 years 10 months ago #227282 by norfolkandway
And to open in a new window
<a href=" www.facebook.com/ [cb_fbid]" target="_blank"> www.facebook.com/ [cb_fbid]</a>

With cb_fbid being the name of the cb field you created to supply a value

What one man can do, So can another.
Last edit: 12 years 10 months ago by norfolkandway. Reason: updated code

Please Log in or Create an account to join the conversation.

Moderators: beatnantkrileon
Powered by Kunena Forum