Page 1 of 1
Remove http check for website field
Posted: 29 Jun 2012, 08:38
by pastoweb
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?
Re: Remove http check for website field
Posted: 29 Jun 2012, 10:00
by pastoweb
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.
Re: Remove http check for website field
Posted: 06 Jul 2012, 15:18
by Benno
Ok.
Kind regards,
Benno