Account > Website field prepended with http://

Hello...

I see that the default (tried in fresh dev install of  Enterprise 11.1) behaviour in the Account Module's Website [URL] Field is to prepend it with http://, rather than https:// ?

This is not done inside the Studio for the field though.   

Anybody know how to change it to https://  ?

Thank you :-)

Example:  enter some text in the filed, say: luke.

Before save it changes to http://luke.

For some related website work we need this to be https.

Parents
  • The http:// is being applied by the URL field in clients/base/fields/url/url.js. You can simply type in the https:// in the front.

       format:function(value){
            if (value) {
                if (!value.match(/^([a-zA-Z]+):/)) {
                    value = 'http://' + value;
                }
                let whiteList = app.config.allowedLinkSchemes;
                this.def.isClickable = true;
                if (!whiteList.filter(function(scheme) {
                    return value.toLowerCase().indexOf(scheme + ':') === 0;
                }).length) {
                    this.def.isClickable = false;
                }
            }
            return value;
        },

    If you want https:// you can work with a developer to create a custom version of the url.js that overrides the format function and replaces the http:// with https://

  • cheers for the info

    am on it and will build into next accounts module update

Reply Children
No Data