Support

  1. magnus.singer
  2. General
  3. Sunday, May 13 2018, 10:27 PM
Hello there,
I have a little problem: I have a url field where the user has to enter his Facebook Profile Link. This field has the placeholder 'facebook.com/'. The default behavior of a url field is to add only 'http://' when it's necessary, but I want that it adds 'https://facebook.com/' when it's necessary. Is this possible and if it is, how can I do this? Big thanks in advance,
Magnus
magnus.singer Accepted Answer
Pro
Thank you very much now it works! Great support and even greater products, keep on going like that!
Greetings,
Magnus
  1. more than a month ago
  2. General
  3. # 1
admin Accepted Answer
Admin
Hi,
try to add following Javascript code to your template:
jQuery(document).ready(function($){
$('input[type="url"]').unbind('blur').blur(function(){
var value=$(this).val();
if(value!='' && value.indexOf('http://')<0 && value.indexOf('https://')<0) $(this).val('https://facebook.com/'+value);
});
});
  1. more than a month ago
  2. General
  3. # 2
magnus.singer Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. General
  3. # 3
admin Accepted Answer
Admin
Hi,
sorry but I does not understood.

if I just enter google.com it adds the http://, but if I enter https://google.com, it does nothing
It is already so.
Is it possible to optimize the default behavior or do I need js?
what kind of optimizations are you thinking?
  1. more than a month ago
  2. General
  3. # 4
magnus.singer Accepted Answer
Pro
Content Protected
  1. more than a month ago
  2. General
  3. # 5
admin Accepted Answer
Admin
Hi,
sorry for late reply, you can do it with a javascript code, but to help you better I need some other information.

For example if a user add something like http://www.google.it then you will have https://facebook.com/www.google.it :o
  1. more than a month ago
  2. General
  3. # 6
  • Page :
  • 1


There are no replies made for this post yet.
However, you are not allowed to reply to this post.

Request Support

Support is currently Offline

Support Availability

Working days: Monday to Friday. The support staff is not available on weekends; in the most of cases tickets will not be answered during that time.

Reply time: Depending on the complexity of your support issue it's usually between a few minutes and 24 hours for paid members and about one week for free members. When we expect longer delays we will notify you.

Guidelines

Before you post: read the documentation and search the forums for an answer to your question.

When you post: include Site Details if you request a support (you can use the form below the reply in Site Details tab).

Auto Solved Question: If after a week the author of the post does not reply to a request by moderator, the question will be marked as resolved.

Language: only English

Search Users

Easy Profile® is not affiliated with or endorsed by Open Source Matters or the Joomla Project. Joomla is Free Software released under the GNU/GPL License.