Web Address Field Validation Needed

6 years 4 months ago #300019 by Spiralmind
Web Address Field Validation Needed was created by Spiralmind
Hello, I found that if I create a web address field and they enter in site.com vs site.com it is a dead link.

Is there a way to force them to add http:// with validation or add it if missing. Otherwise I'll add it to the instructions.

Thank you

Please Log in to join the conversation.

6 years 4 months ago #300054 by krileon
Replied by krileon on topic Web Address Field Validation Needed
http:// is already added by the web address field. How are you displaying the web address field? Normal HTML output of the field properly processes it and adds http:// as needed if missing.


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 to join the conversation.

6 years 4 months ago #300056 by Spiralmind
Replied by Spiralmind on topic Web Address Field Validation Needed
Indeed you are correct. However I am outputting this in a Custom HTML field like this.

It is adding my domain to the URL string in front of their entry if I don't add the http://

So it's like this where birds.com is the entry.

This message contains confidential information

<h4>[cb:if cb_comwebsite!=""]<a href="[cb_comwebsite]" target="_blank" title="Visit [cb_listsort]'s community website">Community Website</a>[/cb:if]</h4>

Please Log in to join the conversation.

6 years 4 months ago #300072 by krileon
Replied by krileon on topic Web Address Field Validation Needed
In that case you'll need to add your own custom validation to ensure they provide a URL with http://. You can do this using the "Authorized input" parameter under Parameters > Validation. Set to "Custom PERL regular expression" and then you can supply your own REGEXP for validating the field. If not familiar with REGEXP I suggest the below site to help get started.

www.regular-expressions.info/


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 to join the conversation.

6 years 4 months ago #300093 by Spiralmind
Replied by Spiralmind on topic Web Address Field Validation Needed
What's odd is your system is adding it but only if I use the standard method to show it. So it must be adding the http:// but does not translate to my substitutions?

Please Log in to join the conversation.

6 years 4 months ago #300096 by krileon
Replied by krileon on topic Web Address Field Validation Needed
The http:// is added by the HTML processing of the web address field on display if it's missing. When using [FIELD_NAME] you are using the stored database value so it's not going to have any of that processing.


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 to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.314 seconds

Facebook Twitter LinkedIn