Hi, I want to use the website field to store different information (country).
How can I remove the valididy check on the "http" presence on submit?
Remove http check for website field
-
- Phoca Newbie
- Posts: 5
- Joined: 05 Sep 2010, 19:45
Re: Remove http check for website field
Ok, I did it 
in case someone needs, just modify helpers/phocaguestbook.php adding a "return true;" in isURLAddress function:
function isURLAddress($url) {
return true;
return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);
}
This way, if you don't need users to enter a website address, you can use this field for any other information.

in case someone needs, just modify helpers/phocaguestbook.php adding a "return true;" in isURLAddress function:
function isURLAddress($url) {
return true;
return preg_match('|^http(s)?://[a-z0-9-]+(.[a-z0-9-]+)*(:[0-9]+)?(/.*)?$|i', $url);
}
This way, if you don't need users to enter a website address, you can use this field for any other information.
- Benno
- Phoca Hero
- Posts: 9704
- Joined: 04 Dec 2008, 11:58
- Location: Germany
- Contact:
Re: Remove http check for website field
Ok.
Kind regards,
Benno
Kind regards,
Benno